docker-OpenWrt.yml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. if: github.repository_owner == 'wolfssl'
  18. runs-on: ubuntu-22.04
  19. # This should be a safe limit for the tests to run.
  20. timeout-minutes: 4
  21. container:
  22. image: alpine:latest
  23. steps:
  24. - name: Install required tools
  25. 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
  26. - uses: actions/checkout@v4
  27. - name: Compile libwolfssl.so
  28. run: ./autogen.sh && ./configure --enable-all && make
  29. # 2024-08-05 - Something broke in the actions. They are no longer following links.
  30. - name: tar libwolfssl.so
  31. working-directory: src/.libs
  32. run: tar -zcf libwolfssl.tgz libwolfssl.so*
  33. - name: Upload libwolfssl.so
  34. uses: actions/upload-artifact@v4
  35. with:
  36. name: openwrt-libwolfssl.so
  37. path: src/.libs/libwolfssl.tgz
  38. retention-days: 5
  39. compile_container:
  40. name: Compile container
  41. if: github.repository_owner == 'wolfssl'
  42. runs-on: ubuntu-22.04
  43. # This should be a safe limit for the tests to run.
  44. timeout-minutes: 2
  45. needs: build_library
  46. strategy:
  47. fail-fast: false
  48. matrix:
  49. release: [ "22.03.6", "21.02.7" ] # some other versions: 21.02.0 21.02.5 22.03.0 22.03.3 snapshot
  50. steps:
  51. - uses: actions/checkout@v4
  52. - uses: docker/setup-buildx-action@v3
  53. - uses: actions/download-artifact@v4
  54. with:
  55. name: openwrt-libwolfssl.so
  56. path: .
  57. - name: untar libwolfssl.so
  58. run: tar -xf libwolfssl.tgz -C Docker/OpenWrt
  59. - name: Build but dont push
  60. uses: docker/build-push-action@v5
  61. with:
  62. context: Docker/OpenWrt
  63. platforms: linux/amd64
  64. push: false
  65. tags: openwrt-test:latest
  66. build-args: DOCKER_BASE_CONTAINER=openwrt/rootfs:x86-64-${{ matrix.release }}
  67. cache-from: type=gha
  68. cache-to: type=gha,mode=max