Skip to content

Commit 0632a4b

Browse files
authored
ci: build alpine linux to match what the release builder does (#3642)
Also fix the underlying issue which was that `lit` was not being correctly installed via pip3. See #3459
1 parent 760a51b commit 0632a4b

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/build_release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ jobs:
113113
./alpine.sh apk update
114114
./alpine.sh apk add build-base cmake git python3 clang ninja
115115
116+
- name: install python dev dependencies
117+
run: ./alpine.sh pip3 install -r requirements-dev.txt
118+
116119
- name: cmake
117120
run: |
118121
./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

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,42 @@ jobs:
148148
- name: test
149149
run: python check.py --binaryen-bin=out/bin
150150

151+
# Build with gcc 6.3 and run tests on Alpine Linux (inside chroot).
152+
# Note: Alpine uses musl libc.
153+
# Keep in sync with build_release.yml
154+
build-alpine:
155+
name: alpine
156+
runs-on: ubuntu-latest
157+
steps:
158+
- uses: actions/setup-python@v1
159+
with:
160+
python-version: '3.x'
161+
- uses: actions/checkout@v1
162+
- name: start docker
163+
run: |
164+
docker run -w /src -dit --name alpine -v $PWD:/src node:lts-alpine
165+
echo 'docker exec alpine "$@";' > ./alpine.sh
166+
chmod +x ./alpine.sh
167+
168+
- name: install packages
169+
run: |
170+
./alpine.sh apk update
171+
./alpine.sh apk add build-base cmake git python3 clang ninja
172+
173+
- name: install python dev dependencies
174+
run: ./alpine.sh pip3 install -r requirements-dev.txt
175+
176+
- name: cmake
177+
run: |
178+
./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
179+
180+
- name: build
181+
run: |
182+
./alpine.sh ninja install
183+
184+
- name: test
185+
run: ./alpine.sh python3 ./check.py
186+
151187
# Duplicates build-asan. Please keep in sync
152188
build-ubsan:
153189
name: ubsan

0 commit comments

Comments
 (0)