docker-OpenWrt.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # This workflow tests out new libraries with existing OpenWrt builds to check
  2. # there aren't any compatibility issues. Take a look at Docker/OpenWrt/README.md
  3. name: OpenWrt test
  4. # START OF COMMON SECTION
  5. on:
  6. push:
  7. branches: [ 'master', 'main', 'release/**' ]
  8. pull_request:
  9. branches: [ '*' ]
  10. concurrency:
  11. group: ${{ github.workflow }}-${{ github.ref }}
  12. cancel-in-progress: true
  13. # END OF COMMON SECTION
  14. jobs:
  15. build_library:
  16. name: Compile libwolfssl.so
  17. runs-on: ubuntu-latest
  18. # This should be a safe limit for the tests to run.
  19. timeout-minutes: 4
  20. container:
  21. image: alpine:latest
  22. steps:
  23. - name: Install required tools
  24. run: apk add argp-standalone asciidoc bash bc binutils bzip2 cdrkit coreutils diffutils elfutils-dev findutils flex musl-fts-dev g++ gawk gcc gettext git grep intltool libxslt linux-headers make musl-libintl musl-obstack-dev ncurses-dev openssl-dev patch perl python3-dev rsync tar unzip util-linux wget zlib-dev autoconf automake libtool
  25. - uses: actions/checkout@v4
  26. - name: Compile libwolfssl.so
  27. run: ./autogen.sh && ./configure --enable-all && make
  28. # 2024-08-05 - Something broke in the actions. They are no longer following links.
  29. - name: tar libwolfssl.so
  30. working-directory: src/.libs
  31. run: tar -zcf libwolfssl.tgz libwolfssl.so*
  32. - name: Upload libwolfssl.so
  33. uses: actions/upload-artifact@v4
  34. with:
  35. name: openwrt-libwolfssl.so
  36. path: src/.libs/libwolfssl.tgz
  37. retention-days: 5
  38. compile_container:
  39. name: Compile container
  40. runs-on: ubuntu-latest
  41. # This should be a safe limit for the tests to run.
  42. timeout-minutes: 2
  43. needs: build_library
  44. strategy:
  45. fail-fast: false
  46. matrix:
  47. release: [ "22.03.6", "21.02.7" ] # some other versions: 21.02.0 21.02.5 22.03.0 22.03.3 snapshot
  48. steps:
  49. - uses: actions/checkout@v4
  50. - uses: docker/setup-buildx-action@v3
  51. - uses: actions/download-artifact@v4
  52. with:
  53. name: openwrt-libwolfssl.so
  54. path: .
  55. - name: untar libwolfssl.so
  56. run: tar -xf libwolfssl.tgz -C Docker/OpenWrt
  57. - name: Build but dont push
  58. uses: docker/build-push-action@v5
  59. with:
  60. context: Docker/OpenWrt
  61. platforms: linux/amd64
  62. push: false
  63. tags: openwrt-test:latest
  64. build-args: DOCKER_BASE_CONTAINER=openwrt/rootfs:x86-64-${{ matrix.release }}
  65. cache-from: type=gha
  66. cache-to: type=gha,mode=max