Add analysis pipeline definitions #1158
Workflow file for this run
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 | |
on: | |
push: | |
branches: | |
- main | |
- release/* | |
pull_request: | |
branches: | |
- main | |
- release/* | |
- feature/* | |
env: | |
CARGO_TERM_COLOR: always | |
QIRLIB_DOWNLOAD_LLVM: false | |
jobs: | |
build: | |
runs-on: ${{ matrix.config.os }} | |
env: ${{ matrix.config.env }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
os: "ubuntu-20.04", | |
arch: "amd64", | |
target: "checks", | |
env: {}, | |
} | |
- { | |
os: "ubuntu-20.04", | |
arch: "amd64", | |
target: "default", | |
env: {}, | |
} | |
- { | |
os: "windows-2019", | |
arch: "amd64", | |
target: "default", | |
env: {}, | |
} | |
- { | |
os: "macos-11", | |
arch: "amd64", | |
target: "default", | |
env: { | |
MACOSX_DEPLOYMENT_TARGET: 10.9 | |
}, | |
} | |
- { | |
os: "macos-14", | |
arch: "aarch64", | |
target: "default", | |
env: { }, | |
} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup rust toolchain | |
uses: ./.github/actions/rust-toolchain | |
with: | |
toolchain: 1.75.0 | |
components: rustfmt clippy | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
if: ${{ matrix.config.os != 'macos-14' }} | |
- name: Linux - Install build dependencies, ccache, ninja | |
run: sudo apt-get install -y ccache ninja-build | |
if: ${{ matrix.config.os == 'ubuntu-20.04' }} | |
- name: Windows - Install build dependencies, sccache, ninja | |
run: choco install --accept-license -y sccache ninja | |
if: ${{ matrix.config.os == 'windows-2019' }} | |
- name: MacOS - Install build dependencies, ccache, ninja | |
run: brew install ccache ninja | |
if: ${{ matrix.config.os == 'macos-11' }} | |
- name: MacOS - Install build dependencies, ccache, ninja | |
run: brew install ccache ninja | |
if: ${{ matrix.config.os == 'macos-14' }} | |
- name: Install LLVM | |
uses: ./.github/actions/install-llvm | |
with: | |
version: "14" | |
os: ${{ matrix.config.os }} | |
directory: ${{ github.workspace }}/target/llvm | |
target: ${{ matrix.config.target }} | |
- name: "Build ${{ matrix.config.target }}" | |
run: ./build.ps1 -t ${{ matrix.config.target }} | |
shell: pwsh | |
- name: Artifacts - manylinux | |
uses: actions/upload-artifact@v4 | |
with: | |
name: manylinux-artifacts | |
path: target/wheels/*manylinux_2_*.whl | |
if: ${{ matrix.config.os == 'ubuntu-20.04' }} | |
- name: Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.config.os }}-artifacts | |
path: target/wheels/* | |
if: ${{ matrix.config.os != 'ubuntu-20.04' }} | |
docs: | |
runs-on: "ubuntu-20.04" | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: false | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: manylinux-artifacts | |
path: target/wheels | |
- name: Build Docs | |
run: ./build.ps1 -t docs | |
shell: pwsh | |
# Always publish docs as an artifact, but only publish docs to GitHub Pages | |
# when pushing to main. | |
- name: Publish Docs as Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: docs/_build | |
- name: Publish Docs to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: docs/_build/html | |
if: ${{ github.event_name == 'push' }} |