docker-OpenWrt.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. on:
  5. workflow_call:
  6. jobs:
  7. build_library:
  8. name: Compile libwolfssl.so
  9. runs-on: ubuntu-latest
  10. # This should be a safe limit for the tests to run.
  11. timeout-minutes: 4
  12. container:
  13. image: alpine:latest
  14. steps:
  15. - name: Install required tools
  16. 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
  17. - uses: actions/checkout@v4
  18. - name: Compile libwolfssl.so
  19. run: ./autogen.sh && ./configure --enable-all && make
  20. - name: Upload libwolfssl.so
  21. uses: actions/upload-artifact@v4
  22. with:
  23. name: openwrt-libwolfssl.so
  24. path: src/.libs/libwolfssl.so
  25. retention-days: 5
  26. compile_container:
  27. name: Compile container
  28. runs-on: ubuntu-latest
  29. # This should be a safe limit for the tests to run.
  30. timeout-minutes: 2
  31. needs: build_library
  32. strategy:
  33. fail-fast: false
  34. matrix:
  35. release: [ "22.03.6", "21.02.7" ] # some other versions: 21.02.0 21.02.5 22.03.0 22.03.3 snapshot
  36. steps:
  37. - uses: actions/checkout@v4
  38. - uses: docker/setup-buildx-action@v3
  39. - uses: actions/download-artifact@v4
  40. with:
  41. name: openwrt-libwolfssl.so
  42. path: Docker/OpenWrt/.
  43. - name: Build but dont push
  44. uses: docker/build-push-action@v5
  45. with:
  46. context: Docker/OpenWrt
  47. platforms: linux/amd64
  48. push: false
  49. tags: openwrt-test:latest
  50. build-args: DOCKER_BASE_CONTAINER=openwrt/rootfs:x86-64-${{ matrix.release }}
  51. cache-from: type=gha
  52. cache-to: type=gha,mode=max