mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Update open wrt test (#6010)
Adding in tests of various versions of OpenWrt. Also simplified the way to reproduce potential issues and added in breadcrumbs for debugging. Co-authored-by: Andras Fekete <andras@wolfssl.com>
This commit is contained in:
39
.github/workflows/docker-OpenWrt.yml
vendored
39
.github/workflows/docker-OpenWrt.yml
vendored
@ -2,7 +2,8 @@
|
|||||||
# there aren't any compatibility issues. Take a look at Docker/OpenWrt/README.md
|
# there aren't any compatibility issues. Take a look at Docker/OpenWrt/README.md
|
||||||
name: OpenWrt test
|
name: OpenWrt test
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.ref }}
|
group: ${{ github.head_ref || github.run_id }}
|
||||||
|
# cancel-in-progress: true
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -11,23 +12,45 @@ on:
|
|||||||
branches: [ '*' ]
|
branches: [ '*' ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
compile_container:
|
build_library:
|
||||||
name: Build OpenWrt test container
|
name: Compile libwolfssl.so
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
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@v3
|
||||||
|
- name: Compile libwolfssl.so
|
||||||
|
run: ./autogen.sh && ./configure --enable-all && make
|
||||||
|
- name: Upload libwolfssl.so
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: libwolfssl.so
|
||||||
|
path: src/.libs/libwolfssl.so
|
||||||
|
retention-days: 1
|
||||||
|
compile_container:
|
||||||
|
name: OpenWrt test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build_library
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
release: [ "snapshot", "22.03-SNAPSHOT", "21.02-SNAPSHOT" ] # some other versions: 21.02.0 21.02.5 22.03.0 22.03.3
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: docker/setup-qemu-action@v2
|
|
||||||
- uses: docker/setup-buildx-action@v2
|
- uses: docker/setup-buildx-action@v2
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: libwolfssl.so
|
||||||
|
path: Docker/OpenWrt/.
|
||||||
-
|
-
|
||||||
name: Build but dont push
|
name: Build but dont push
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: Docker/OpenWrt
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
file: Docker/OpenWrt/Dockerfile
|
|
||||||
push: false
|
push: false
|
||||||
tags: openwrt-test:latest
|
tags: openwrt-test:latest
|
||||||
# cache-from: type=registry,ref=openwrt-test:latest
|
build-args: DOCKER_BASE_CONTAINER=openwrt/rootfs:x86-64-${{ matrix.release }}
|
||||||
# cache-to: type=inline
|
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
@ -1,18 +1,12 @@
|
|||||||
# This Dockerfile is used in conjunction with the docker-OpenWrt.yml GitHub Action.
|
# This Dockerfile is used in conjunction with the docker-OpenWrt.yml GitHub Action.
|
||||||
FROM alpine:latest AS builder
|
ARG DOCKER_BASE_CONTAINER=openwrt/rootfs:x86-64-snapshot
|
||||||
|
FROM $DOCKER_BASE_CONTAINER
|
||||||
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
|
|
||||||
COPY . /workspace
|
|
||||||
RUN cd /workspace && ./autogen.sh && ./configure --enable-all && make
|
|
||||||
|
|
||||||
FROM openwrt/rootfs:x86-64-22.03.0
|
|
||||||
|
|
||||||
RUN mkdir -p /var/lock # Fix for parent container
|
RUN mkdir -p /var/lock # Fix for parent container
|
||||||
RUN rm -f /usr/lib/libwolfssl* # make sure to eliminate existing wolfSSL library
|
COPY libwolfssl.so /tmp/libwolfssl.so
|
||||||
COPY --from=builder /workspace/src/.libs/libwolfssl.so.35.3.0 /usr/lib/libwolfssl.so.5.4.0.ee39414e
|
RUN export LIBWOLFSSL=$(ls /usr/lib/libwolfssl.so.* -1); \
|
||||||
COPY Docker/OpenWrt/runTests.sh /tmp/.
|
rm ${LIBWOLFSSL} && ln -s /tmp/libwolfssl.so ${LIBWOLFSSL}
|
||||||
|
# for debugging purposes to make sure the correct library is tested
|
||||||
|
RUN ls -Ll /usr/lib/libwolfssl* && ldd /lib/libustream-ssl.so | grep wolfssl
|
||||||
|
COPY runTests.sh /tmp/.
|
||||||
RUN /tmp/runTests.sh
|
RUN /tmp/runTests.sh
|
||||||
|
@ -4,8 +4,10 @@ compile a new libwolfssl that gets placed in official OpenWrt containers to
|
|||||||
run some tests ensuring the library is still compatible with existing
|
run some tests ensuring the library is still compatible with existing
|
||||||
binaries.
|
binaries.
|
||||||
|
|
||||||
To run the build locally, you can run (in your wolfSSL root directory):
|
To run the test locally, build libwolfssl.so (or download from the GitHub Action)
|
||||||
docker build -t openwrt -f Docker/OpenWrt/Dockerfile .
|
and put it in Docker/OpenWrt. Then switch to that folder and run:
|
||||||
|
docker build -t openwrt --build-args DOCKER_BASE_CONTAINER=<openwrtContainer> .
|
||||||
|
where 'openwrtContainer' => "openwrt/rootfs:x86-64-22.03-SNAPSHOT" or similar
|
||||||
|
|
||||||
This should build the entire container and run some sample tests. The resulting
|
This should run some sample tests. The resulting container then can be used to
|
||||||
container then can be used to evaluate OpenWrt with the latest wolfSSL library.
|
evaluate OpenWrt with the latest wolfSSL library.
|
||||||
|
Reference in New Issue
Block a user