mirror of https://github.com/wolfSSL/wolfssl.git
85 lines
3.9 KiB
YAML
85 lines
3.9 KiB
YAML
# This workflow tests out new libraries with existing OpenWrt builds to check
|
|
# there aren't any compatibility issues. Take a look at Docker/OpenWrt/README.md
|
|
name: OpenWrt test
|
|
|
|
# START OF COMMON SECTION
|
|
on:
|
|
push:
|
|
branches: [ 'release/**' ]
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
branches: [ '*' ]
|
|
# Weekend cron and manual workflow_dispatch refresh the shared ghcr build
|
|
# cache that PR runs read (cache-to below is gated to those two events).
|
|
schedule:
|
|
- cron: '30 7 * * 6'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
# END OF COMMON SECTION
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
build_library:
|
|
name: Compile libwolfssl.so
|
|
if: ${{ (github.repository_owner == 'wolfssl') && (github.event_name != 'pull_request' || github.event.pull_request.draft == false) }}
|
|
runs-on: ubuntu-24.04
|
|
# This should be a safe limit for the tests to run.
|
|
timeout-minutes: 4
|
|
container:
|
|
image: alpine:latest
|
|
steps:
|
|
- name: Install required tools
|
|
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
|
|
- uses: actions/checkout@v5
|
|
- name: Compile libwolfssl.so
|
|
run: ./autogen.sh && ./configure --enable-all && make
|
|
# 2024-08-05 - Something broke in the actions. They are no longer following links.
|
|
- name: tar libwolfssl.so
|
|
working-directory: src/.libs
|
|
run: tar -zcf libwolfssl.tgz libwolfssl.so*
|
|
- name: Upload libwolfssl.so
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: openwrt-libwolfssl.so
|
|
path: src/.libs/libwolfssl.tgz
|
|
retention-days: 5
|
|
compile_container:
|
|
name: Compile container
|
|
if: ${{ (github.repository_owner == 'wolfssl') && (github.event_name != 'pull_request' || github.event.pull_request.draft == false) }}
|
|
runs-on: ubuntu-24.04
|
|
# This should be a safe limit for the tests to run.
|
|
timeout-minutes: 2
|
|
needs: build_library
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
release: [ "22.03.6", "21.02.7" ] # some other versions: 21.02.0 21.02.5 22.03.0 22.03.3 snapshot
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: docker/setup-buildx-action@v4
|
|
- name: Log in to ghcr (cache refresh on cron/manual dispatch)
|
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
|
|
- uses: actions/download-artifact@v7
|
|
with:
|
|
name: openwrt-libwolfssl.so
|
|
path: .
|
|
- name: untar libwolfssl.so
|
|
run: tar -xf libwolfssl.tgz -C Docker/OpenWrt
|
|
- name: Build but dont push
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
context: Docker/OpenWrt
|
|
platforms: linux/amd64
|
|
push: false
|
|
tags: openwrt-test:latest
|
|
build-args: DOCKER_BASE_CONTAINER=openwrt/rootfs:x86-64-${{ matrix.release }}
|
|
cache-from: type=registry,ref=ghcr.io/wolfssl/wolfssl-sim-cache:openwrt-${{ matrix.release }}
|
|
cache-to: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && format('type=registry,ref=ghcr.io/wolfssl/wolfssl-sim-cache:openwrt-{0},mode=max', matrix.release) || '' }}
|