Skip to content

Commit c294c06

Browse files
committed
[CI] Add Alpine builders
Signed-off-by: AeroStun <[email protected]>
1 parent b2be9b7 commit c294c06

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,54 @@ jobs:
313313
with:
314314
name: libSMCE-windows-${{ matrix.compiler.c }}
315315
path: build/packages/*
316+
build-alpine:
317+
name: libSMCE - Alpine (${{ matrix.compiler.name }})
318+
runs-on: ubuntu-latest
319+
container: alpine:latest
320+
strategy:
321+
fail-fast: false
322+
matrix:
323+
compiler:
324+
- name: GCC
325+
c: gcc
326+
cxx: g++
327+
pkgs: [ g++ ]
328+
- name: Clang/LLVM
329+
c: clang
330+
cxx: clang++
331+
pkgs: [ clang, compiler-rt, compiler-rt-static, lld, libunwind-dev, musl-dev, g++ ]
332+
env:
333+
CC: ${{ matrix.compiler.c }}
334+
CXX: ${{ matrix.compiler.cxx }}
335+
steps:
336+
- run: cd ~
337+
- uses: actions/checkout@v3
338+
- name: Check deps
339+
run: |
340+
apk update
341+
apk upgrade
342+
apk add git ninja cmake ${{ join(matrix.compiler.pkgs, ' ') }}
343+
apk add wget linux-headers openssl-dev mosquitto-dev
344+
- name: Install arduino-prelude APK
345+
run: |
346+
wget -O arduino-prelude.apk https://github.com/ItJustWorksTM/arduino-prelude/releases/download/v1.0.2/arduino-prelude-1.0.2-r0-x86_64.apk
347+
apk add --allow-untrusted ./arduino-prelude.apk
348+
rm arduino-prelude.apk
349+
- name: CMake configure
350+
run: |
351+
if [ "${{ matrix.compiler.c }}" = "clang" ]; then
352+
echo 'LDFLAGS=-fuse-ld=lld --rtlib=compiler-rt -lunwind' >> $GITHUB_ENV
353+
fi
354+
cmake -G Ninja \
355+
-DCMAKE_BUILD_TYPE=Release \
356+
-S ./ -B ./build
357+
- name: CMake build
358+
run: cmake --build ./build
359+
- name: Build & Run tests
360+
run: |
361+
cmake --build ./build --target SMCE_Tests
362+
cd build/test
363+
ctest --output-on-failure
316364
build-arch:
317365
name: libSMCE - ArchLinux (${{ matrix.compiler.name }})
318366
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)