docker-OpenWrt.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. - name: Upload libwolfssl.so
  29. uses: actions/upload-artifact@v4
  30. with:
  31. name: openwrt-libwolfssl.so
  32. path: src/.libs/libwolfssl.so
  33. retention-days: 5
  34. compile_container:
  35. name: Compile container
  36. runs-on: ubuntu-latest
  37. # This should be a safe limit for the tests to run.
  38. timeout-minutes: 2
  39. needs: build_library
  40. strategy:
  41. fail-fast: false
  42. matrix:
  43. release: [ "22.03.6", "21.02.7" ] # some other versions: 21.02.0 21.02.5 22.03.0 22.03.3 snapshot
  44. steps:
  45. - uses: actions/checkout@v4
  46. - uses: docker/setup-buildx-action@v3
  47. - uses: actions/download-artifact@v4
  48. with:
  49. name: openwrt-libwolfssl.so
  50. path: Docker/OpenWrt/.
  51. - name: Build but dont push
  52. uses: docker/build-push-action@v5
  53. with:
  54. context: Docker/OpenWrt
  55. platforms: linux/amd64
  56. push: false
  57. tags: openwrt-test:latest
  58. build-args: DOCKER_BASE_CONTAINER=openwrt/rootfs:x86-64-${{ matrix.release }}
  59. cache-from: type=gha
  60. cache-to: type=gha,mode=max