Skip to content

Add link function to Module #1223

Add link function to Module

Add link function to Module #1223

Workflow file for this run

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-12",
arch: "amd64",
target: "default",
env: {
MACOSX_DEPLOYMENT_TARGET: 10.9
},
}
- {
os: "macos-14",
arch: "aarch64",
target: "default",
env: { },
}
- {
os: "macos-14",
arch: "universal",
target: "default",
env: {
ARCHFLAGS: "-arch arm64 -arch x86_64"
},
}
steps:
- uses: actions/checkout@v4
- name: Setup rust toolchain
uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.78.0
components: rustfmt clippy
- shell: pwsh
run: |
rustup target add x86_64-apple-darwin
if: ${{ (matrix.config.os == 'macos-14') && (matrix.config.arch == 'universal') }}
- 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: Install LLVM
uses: ./.github/actions/install-llvm
with:
version: "14"
os: ${{ matrix.config.os }}
arch: ${{ matrix.config.arch }}
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 }}-${{ matrix.config.arch }}-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' }}