Add support for Mac #590
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: CI (Coq) | |
on: | |
push: | |
branches: [ master , main ] | |
pull_request: | |
schedule: | |
- cron: '0 0 1 * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# N.B. The update-README makefile target pulls information | |
# about Coq versions from this file, so be careful about the | |
# presence of COQ_VERSION immediately followed by : in this | |
# file and about the ordering of the list | |
COQ_VERSION: ["dev-native", "8.19-native", "8.18-native", "8.17-native", "8.16-native", "8.15", "8.14", "8.13", "8.12", "8.11", "8.10", "8.9", "8.8"] | |
concurrency: | |
group: ${{ github.workflow }}-${{ matrix.COQ_VERSION }}-${{ github.head_ref || ( github.ref == 'refs/heads/master' && github.run_id ) || github.ref }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: echo build params | |
run: | | |
echo "::group::lscpu" | |
lscpu | |
echo "::endgroup::" | |
echo "::group::uname -a" | |
uname -a | |
echo "::endgroup::" | |
echo "::group::lsb_release -a" | |
lsb_release -a | |
echo "::endgroup::" | |
echo "::group::etc/machine.sh" | |
etc/machine.sh | |
echo "::endgroup::" | |
- uses: coq-community/docker-coq-action@v1 | |
with: | |
coq_version: ${{ matrix.COQ_VERSION }} | |
ocaml_version: default | |
custom_script: | | |
startGroup "install deps" | |
sudo apt-get -o Acquire::Retries=30 update -q | |
sudo apt-get -o Acquire::Retries=30 install -y --allow-unauthenticated \ | |
texlive \ | |
texlive-latex-extra \ | |
texlive-bibtex-extra \ | |
texlive-science \ | |
texlive-luatex \ | |
texlive-lang-greek \ | |
lmodern \ | |
biber \ | |
gnuplot-nox \ | |
wget \ | |
curl \ | |
sed \ | |
grep \ | |
pdf2svg \ | |
python3 \ | |
python3-pygments | |
endGroup | |
startGroup "lscpu" | |
lscpu | |
endGroup | |
startGroup "uname -a" | |
uname -a | |
endGroup | |
startGroup "etc/machine.sh" | |
etc/machine.sh | |
endGroup | |
startGroup "ocamlc -config" | |
ocamlc -config | |
endGroup | |
startGroup "coqc --config" | |
coqc --config | |
endGroup | |
startGroup "coqc --version" | |
coqc --version | |
endGroup | |
startGroup "echo | coqtop" | |
true | coqtop | |
endGroup | |
sudo chmod -R a=u . | |
# Work around https://github.com/actions/checkout/issues/766 | |
git config --global --add safe.directory "*" | |
startGroup 'make -j2 TIMED=1' | |
make -j2 TIMED=1 | |
endGroup | |
startGroup 'make perf TIMED=1' | |
make perf TIMED=1 | |
endGroup | |
startGroup 'make validate -j2' | |
make validate -j2 | |
endGroup | |
startGroup 'make install install-perf' | |
make install install-perf | |
endGroup | |
startGroup 'make copy-perf OUTPUT="doc-build/${{ matrix.COQ_VERSION }}"' | |
make copy-perf OUTPUT="doc-build/${{ matrix.COQ_VERSION }}" | |
endGroup | |
startGroup 'make pdf' | |
make pdf | |
endGroup | |
startGroup 'make doc' | |
make doc | |
endGroup | |
startGroup 'make copy-pdf copy-doc OUTPUT="doc-build/${{ matrix.COQ_VERSION }}"' | |
make copy-pdf copy-doc OUTPUT="doc-build/${{ matrix.COQ_VERSION }}" | |
endGroup | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.COQ_VERSION }} | |
path: doc-build/${{ matrix.COQ_VERSION }} | |
check-all: | |
runs-on: ubuntu-latest | |
needs: build | |
if: always() | |
steps: | |
- run: echo 'The triggering workflow passed' | |
if: ${{ needs.build.result == 'success' }} | |
- run: echo 'The triggering workflow failed' && false | |
if: ${{ needs.build.result != 'success' }} | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: checkout repo (only required because of deploy step) # https://github.com/JamesIves/github-pages-deploy-action/issues/335 | |
uses: actions/checkout@v4 | |
- name: Download a Build Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
path: doc-build | |
- name: Deploy pdfs | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: doc-build | |
SINGLE_COMMIT: true | |
if: github.ref == 'refs/heads/master' && ( github.event_name == 'push' || github.event_name == 'schedule' ) | |
deploy-history: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: checkout repo (only required because of deploy step) # https://github.com/JamesIves/github-pages-deploy-action/issues/335 | |
uses: actions/checkout@v4 | |
- name: Install SSH Client 🔑 | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.HISTORY_DEPLOY_KEY }} | |
if: github.ref == 'refs/heads/master' && ( github.event_name == 'push' || github.event_name == 'schedule' ) | |
- name: Download a Build Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
path: doc-build | |
- name: Deploy pdfs to history repo | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
REPOSITORY_NAME: coq-community/coq-performance-tests-plots-history | |
SSH: true | |
BRANCH: main | |
FOLDER: doc-build | |
SINGLE_COMMIT: false | |
if: github.ref == 'refs/heads/master' && ( github.event_name == 'push' || github.event_name == 'schedule' ) |