docker-OpenWrt.yml 2.2 KB

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