Trying to extend alpine.

This commit is contained in:
Daniel Lemire 2023-02-06 14:39:21 -05:00
parent 69e0ea6f8a
commit 18349287f4

View File

@ -1,27 +1,45 @@
name: Alpine Linux name: Alpine Linux
'on': on:
- push - push
- pull_request - pull_request
jobs: jobs:
ubuntu-build: build:
name: Build on Alpine ${{ matrix.arch }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
arch:
- x86_64
- aarch64
- armv7
- ppc64le
- riscv64
steps: steps:
- uses: actions/checkout@v3 - name: Checkout repository
- name: start docker uses: actions/checkout@v1
- name: Install latest Alpine Linux for ${{ matrix.arch }}
uses: jirutka/setup-alpine@v1
with:
arch: ${{ matrix.arch }}
branch: ${{ matrix.arch == 'riscv64' && 'edge' || 'latest-stable' }}
packages: >
build-base
cmake
g++
linux-headers
git
bashbuild-base
- name: Prepare
run: | run: |
docker run -w /src -dit --name alpine -v $PWD:/src alpine:latest cmake -DFASTFLOAT_TEST=ON -B build
echo 'docker exec alpine "$@";' > ./alpine.sh shell: alpine.sh {0}
chmod +x ./alpine.sh - name: Build
- name: install packages
run: | run: |
./alpine.sh apk update cmake --build build
./alpine.sh apk add build-base cmake g++ linux-headers git bash shell: alpine.sh {0}
- name: cmake - name: Test
run: | run: |
./alpine.sh cmake -DFASTFLOAT_TEST=ON -B build_for_alpine ctest --test-dir build -R basictest
- name: build shell: alpine.sh {0}
run: |
./alpine.sh cmake --build build_for_alpine
- name: test
run: |
./alpine.sh bash -c "cd build_for_alpine && ctest -R basictest"