-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add workflow for Alpine Linux to GHA
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |