Skip to content

Commit

Permalink
ci: add workflow for Alpine Linux to GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
striezel committed Mar 24, 2024
1 parent c22e8fb commit 1fce348
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Alpine

on: push

jobs:
alpine:
runs-on: ubuntu-22.04
container: alpine:latest
steps:
- name: Install and prepare Git
run: |
apk update && apk upgrade
apk add git
git config --global --add safe.directory "$GITHUB_WORKSPACE"
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install packages
run: |
apk update
apk add catch2 cmake curl-dev g++ git make mariadb-connector-c-dev pkgconf
- name: Build
run: |
cd "$GITHUB_WORKSPACE"
mkdir build
cd build
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
cmake ../
cmake --build . -j2
- name: Run tests
run: |
cd "$GITHUB_WORKSPACE/build"
ctest -V
- name: Install statically linked libraries
run: |
apk add brotli-static c-ares-static curl-static libidn2-static
apk add libunistring-static nghttp2-static openssl-libs-static
apk add zlib-static mariadb-static
- name: Build statically linked executables
run: |
cd "$GITHUB_WORKSPACE"
mkdir build-static
cd build-static
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
cmake ../ -DENABLE_LTO=ON -DENABLE_STATIC_LINKING=ON
cmake --build . -j2
- name: Run tests for statically linked build
run: |
cd "$GITHUB_WORKSPACE/build-static"
ctest -V

0 comments on commit 1fce348

Please sign in to comment.