Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Alpine CI #138

Merged
merged 1 commit into from
Dec 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions .github/workflows/coq-alpine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: CI (Coq, Alpine)

on:
push:
branches: [ master ]
pull_request:
merge_group:
workflow_dispatch:
release:
types: [published]
schedule:
- cron: '0 0 1 * *'

jobs:
build:

strategy:
fail-fast: false
matrix:
include:
- alpine: 'edge'
# - alpine: 'latest-stable'

runs-on: ubuntu-latest
name: alpine-${{ matrix.alpine }}

concurrency:
group: ${{ github.workflow }}-alpine-${{ matrix.alpine }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: host build params
run: etc/ci/describe-system-config.sh
- uses: jirutka/setup-alpine@v1
with:
branch: ${{ matrix.alpine }}
extra-repositories: https://dl-cdn.alpinelinux.org/alpine/edge/testing
packages: git make jq gcc musl-dev python3 ocaml ocaml-findlib ghc cabal coq ocaml-zarith bash
# next two steps as per https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/57766#note_365103
- name: Download development Coq
shell: alpine.sh {0}
run: |
mkdir -p MR
wget 'https://gitlab.alpinelinux.org/JasonGross/aports/-/jobs/1224462/artifacts/download?file_type=archive' -O MR.zip
unzip MR.zip -d MR
ls -la MR
find MR
- name: Set up development Coq
shell: alpine.sh --root {0}
run: |
mv MR/keys/*.pub /etc/apk/keys/
echo '::group::cat /etc/apk/repositories'
cat /etc/apk/repositories
echo '::endgroup::'
printf '\n' >> /etc/apk/repositories
ls -d "$(pwd)"/MR/packages/* >> /etc/apk/repositories
echo '::group::cat /etc/apk/repositories'
cat /etc/apk/repositories
echo '::endgroup::'
apk update
apk add --upgrade coq
- name: chroot build params
shell: alpine.sh {0}
run: etc/ci/describe-system-config.sh
- name: explore
shell: alpine.sh {0}
run: |
echo '::group::apk list --installed'
apk list --installed
echo '::endgroup::'
for pkg in coq dune ocaml-ppxlib; do
echo "::group::apk info -L $pkg"
apk info -L $pkg
echo '::endgroup::'
done
for f in $(find MR/packages -name "*.apk"); do
echo "::group::file $f"
file $f || echo $?
echo '::endgroup::'
echo "::group::tar --warning=no-unknown-keyword -tvf $f"
tar --warning=no-unknown-keyword -tvf $f || echo $?
echo '::endgroup::'
done
which coqc
dirname "$(which coqc)"
echo '::group::ocamlfind list'
ocamlfind list
echo '::endgroup::'
echo '::group::ocamlc -where'
ocamlc -where
echo '::endgroup::'
for q in findlib zarith ppxlib dune coq coq-core coq-core.plugins coq-core.plugins.ltac; do
echo "::group::ocamlfind query $q"
ocamlfind query $q || echo $?
echo '::endgroup::'
echo "::group::ocamlfind query $q | xargs find"
( ocamlfind query $q | xargs find ) || echo $?
echo '::endgroup::'
done
- name: make all
shell: alpine.sh {0}
run: etc/ci/github-actions-make.sh ALLOW_DIFF=1 -j2 all
- name: make perf-Sanity
shell: alpine.sh {0}
run: etc/ci/github-actions-make.sh ALLOW_DIFF=1 -j2 perf-Sanity
- name: display timing info
run: cat time-of-build-pretty.log
- name: display per-line timing info
run: etc/ci/github-actions-display-per-line-timing.sh

alpine-check-all:
runs-on: ubuntu-latest
needs: [build]
if: always()
steps:
- run: echo 'build passed'
if: ${{ needs.build.result == 'success' }}
- run: echo 'build failed' && false
if: ${{ needs.build.result != 'success' }}
Loading