lean4-htt/.github/workflows/ci.yml

83 lines
2.4 KiB
YAML

name: CI
on: [ push, pull_request ]
jobs:
skip_check:
name: Skip Check
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v4
with:
concurrent_skipping: 'same_content_newer'
paths_ignore: '["README.md", "LICENSE"]'
build:
needs: skip_check
name: ${{ matrix.name || 'Build' }}
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.shell || 'sh' }}
strategy:
matrix:
include:
- name: Ubuntu
os: ubuntu-latest
- name: MacOS
os: macos-latest
- name: Windows
os: windows-latest
shell: msys2 {0}
# complete all jobs
fail-fast: false
steps:
- name: Install MSYS2 (Windows)
if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
path-type: inherit
install: curl unzip make diffutils mingw-w64-x86_64-gcc mingw-w64-x86_64-gmp
- name: Install Elan (Windows)
if: matrix.os == 'windows-latest'
run: |
curl -sSL https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh > elan-init.sh
./elan-init.sh -y
cygpath -w "$USERPROFILE/.elan/bin" >> $GITHUB_PATH
- name: Install Elan (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
curl -sSL https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh > elan-init.sh
chmod +x elan-init.sh
./elan-init.sh -y
echo "$HOME/.elan/bin" >> $GITHUB_PATH
- name: Install Elan (MacOS)
if: matrix.os == 'macOS-latest'
run: brew install elan
- name: Checkout
uses: actions/checkout@v2
- name: Check Lean
run: lean --version
- name: Build & Time
run: ./time.sh -j4
- name: Upload Build
continue-on-error: true
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}
path: build
- name: Check Lake
run: make check-lake
- name: Test Lake
run: make test-ci -j4
- name: Time Bootstrap
run: make time-bootstrap
- name: Check Bootstrap
run: make check-bootstrap
- name: Test Bootstrapped Lake
run: make test-bootstrapped -j4