Skip to content

DEV: Cancel old CI runs when new run on same target starts #700

DEV: Cancel old CI runs when new run on same target starts

DEV: Cancel old CI runs when new run on same target starts #700

Workflow file for this run

name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
- cron: "35 4 */6 * *" # Every 6 days.
pull_request:
push:
permissions:
contents: read
jobs:
build-iqtree:
name: Fetch or Build IQ-TREE Static Library on ${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14, windows-latest] # Intel linux, Intel Mac, ARM Mac, Windows
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- id: build
uses: ./.github/actions/build-iqtree
with:
os: ${{ matrix.os }}
outputs:
iqtree-sha: ${{steps.build.outputs.iqtree-sha}}
tests:
name: Run Tests with Python ${{matrix.python-version}} on ${{matrix.os}}
needs: build-iqtree
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14, windows-latest] # Intel linux, Intel Mac, ARM Mac, Windows
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: ./.github/actions/setup-piqtree
with:
python-version: ${{ matrix.python-version }}
cache-key: libiqtree-${{ matrix.os }}-${{ needs.build-iqtree.outputs.iqtree-sha }}
- name: Install llvm (macOS)
if: runner.os == 'macOS'
run: |
brew install llvm
- name: Install llvm (Windows)
if: runner.os == 'Windows'
run: |
choco install -y llvm --version=14.0.6 --allow-downgrade
- name: Run Nox Testing
run: |
pip install nox
nox -s test-${{ matrix.python-version }} -- --cov --cov-report=lcov:${{matrix.os}}-${{matrix.python-version}}.lcov --cov-report=term --cov-append --durations=20
- name: Coveralls Parallel
if: matrix.os != 'macos-13'
uses: coverallsapp/github-action@v2
with:
parallel: true
github-token: ${{secrets.github_token}}
flag-name: run-${{matrix.python-version}}-${{matrix.os}}
file: "${{matrix.os}}-${{matrix.python-version}}.lcov"
upload-coverage:
name: Finish Coveralls
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
type_check:
name: Type Check
needs: build-iqtree
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.13"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup-piqtree
with:
python-version: ${{ matrix.python-version }}
cache-key: libiqtree-${{ matrix.os }}-${{ needs.build-iqtree.outputs.iqtree-sha }}
- name: "Run Type Checking for ${{ matrix.python-version }}"
run: |
pip install nox
nox -s type_check-${{ matrix.python-version }}
lint:
name: Linting
needs: build-iqtree
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.13"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup-piqtree
with:
python-version: ${{ matrix.python-version }}
cache-key: libiqtree-${{ matrix.os }}-${{ needs.build-iqtree.outputs.iqtree-sha }}
- name: "Run Linting for ${{ matrix.python-version }}"
run: |
pip install nox
nox -s ruff-${{ matrix.python-version }}