Skip to content

Make enums hashable #1074

Make enums hashable

Make enums hashable #1074

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
MACOSX_DEPLOYMENT_TARGET: 10.9
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: "manylinux",
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: {},
}
steps:
- uses: actions/checkout@v3
- name: Setup rust toolchain
uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.64.0
components: rustfmt clippy
- 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: 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: "Build ${{ matrix.config.target }}"
run: ./build.ps1 -t ${{ matrix.config.target }}
shell: pwsh
- name: Artifacts - manylinux
uses: actions/upload-artifact@v2
with:
name: manylinux-artifacts
path: target/wheels/*manylinux_2_17*.whl
if: ${{ matrix.config.os == 'ubuntu-20.04' }}
- name: Artifacts
uses: actions/upload-artifact@v2
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@v2
with:
submodules: false
- name: Download Build Artifacts
uses: actions/download-artifact@v2
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@v2
with:
name: docs
path: docs/_build
- name: Publish Docs to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/_build/html
if: ${{ github.event_name == 'push' }}