ci: add x86_64-linux-static release #3
Workflow file for this run
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
name: release-static | |
on: | |
push: | |
tags: | |
- "*" | |
workflow_dispatch: | |
jobs: | |
release-static: | |
name: release-x86_64-linux-static | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: system-deps | |
run: | | |
sudo apt install -y \ | |
ninja-build | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: checkout-submodules | |
run: git submodule update --init --depth 1 --jobs 2 | |
- name: build | |
run: | | |
cmake \ | |
-Bbuild \ | |
-G Ninja \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX="/tmp/binaryen-$GITHUB_REF_NAME" \ | |
-DCMAKE_EXE_LINKER_FLAGS="-s -static" \ | |
-DBUILD_STATIC_LIB=ON \ | |
-DENABLE_WERROR=OFF \ | |
-DINSTALL_LIBS=OFF | |
cmake --build build --target install -- -v | |
tar \ | |
--sort=name \ | |
--owner=0 \ | |
--group=0 \ | |
--numeric-owner \ | |
-czf "binaryen-$GITHUB_REF_NAME-x86_64-linux-static.tar.gz" \ | |
-C /tmp \ | |
"binaryen-$GITHUB_REF_NAME" | |
- name: upload-artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: binaryen-x86_64-linux-static | |
path: binaryen-*-x86_64-linux-static.tar.gz | |
- name: test | |
run: | | |
VENV_PATH=$(mktemp -d) | |
python3 -m venv $VENV_PATH | |
source $VENV_PATH/bin/activate | |
pip3 install -r requirements-dev.txt | |
COMPILER_FLAGS="-s -static" ./check.py --binaryen-bin build/bin --binaryen-lib build/lib |