Fix Apline compile error on uninitialized value #38
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: Create Release | |
on: | |
# If we run CI on all branches then we end up doing duplicate work for | |
# branches which are also PRs. | |
push: | |
branches: | |
- main | |
- kripken/* | |
pull_request: | |
jobs: | |
# Build with gcc 6.3 and run tests on Alpine Linux (inside chroot). | |
# Note: Alpine uses musl libc. | |
build-alpine: | |
name: alpine | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
docker_platform: [arm64] | |
steps: | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: '3.x' | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
if: matrix.docker_platform != 'amd64' | |
- name: start docker | |
run: | | |
docker run -w /src -dit --platform=linux/${{ matrix.docker_platform }} --name alpine -v $PWD:/src node:lts-alpine | |
echo 'docker exec alpine "$@";' > ./alpine.sh | |
chmod +x ./alpine.sh | |
- name: install packages | |
run: | | |
./alpine.sh apk update | |
./alpine.sh apk add build-base cmake git python3 clang ninja py3-pip | |
- name: install python dev dependencies | |
run: ./alpine.sh pip3 install --break-system-packages -r requirements-dev.txt | |
- name: cmake | |
run: | | |
./alpine.sh cmake . -G Ninja -DCMAKE_CXX_FLAGS="-static" -DCMAKE_C_FLAGS="-static" -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC_LIB=ON -DCMAKE_INSTALL_PREFIX=install | |
- name: build | |
run: | | |
./alpine.sh ninja install | |
- name: test | |
run: ./alpine.sh python3 ./check.py | |
- name: archive | |
id: archive | |
run: | | |
VERSION=$GITHUB_REF_NAME | |
ARCH=$(./alpine.sh uname -m) | |
PKGNAME="binaryen-$VERSION-$ARCH-linux" | |
TARBALL=$PKGNAME.tar.gz | |
SHASUM=$PKGNAME.tar.gz.sha256 | |
./alpine.sh find install/ -type f -perm -u=x -exec strip {} + | |
mv install binaryen-$VERSION | |
tar -czf $TARBALL binaryen-$VERSION | |
cmake -E sha256sum $TARBALL > $SHASUM | |
echo "::set-output name=tarball::$TARBALL" | |
echo "::set-output name=shasum::$SHASUM" | |
- name: upload tarball | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
files: | | |
${{ steps.archive.outputs.tarball }} | |
${{ steps.archive.outputs.shasum }} | |