docker-OpenWrt.yml 2.1 KB

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