Migrate development environment to Pixi #524
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 | |
pull_request: | |
jobs: | |
python-fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: prefix-dev/setup-pixi@v0.8.1 | |
with: | |
pixi-version: v0.28.2 | |
cache: true | |
- uses: actions/checkout@v2 | |
- name: Check cargo fmt compliance | |
run: pixi run fmt-py-check | |
rust-fmt-clippy: | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: "-D warnings" | |
steps: | |
- uses: prefix-dev/setup-pixi@v0.8.1 | |
with: | |
pixi-version: v0.28.2 | |
cache: true | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Cache rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: True | |
- name: Check cargo fmt compliance | |
run: pixi run fmt-rs-check | |
- name: Check no rustc warnings | |
run: pixi run check-rs | |
- name: Check for clippy warnings | |
run: pixi run clippy | |
cargo-bundle-license: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: prefix-dev/setup-pixi@v0.8.1 | |
with: | |
pixi-version: v0.28.2 | |
cache: true | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Check that license is up to date | |
run: pixi run bundle-licenses | |
- name: Check that git detects no file changes | |
run: git diff --exit-code | |
codegen-clean: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: prefix-dev/setup-pixi@v0.8.1 | |
with: | |
pixi-version: v0.28.2 | |
cache: true | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Cache rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: True | |
- name: Run codegen | |
run: pixi run vendor | |
- name: Check that git detects no file changes | |
run: git diff --exit-code | |
vl-convert-rs-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-2022 | |
- macos-12 | |
steps: | |
- uses: prefix-dev/setup-pixi@v0.8.1 | |
with: | |
pixi-version: v0.28.2 | |
cache: true | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Cache rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "v1-rust" | |
cache-on-failure: True | |
- name: Install fonts on Linux | |
if: runner.os == 'Linux' | |
run: | | |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections | |
sudo apt-get install ttf-mscorefonts-installer | |
- name: Run tests | |
# Run tests on single thread for Deno, which expects this | |
run: | | |
pixi run test-rs | |
- name: Upload test failures | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: failed-images | |
path: | | |
vl-convert-rs/tests/vl-specs/failed | |
vl-convert-python-tests: | |
runs-on: ${{ matrix.options[0] }} | |
defaults: | |
run: | |
shell: ${{ matrix.options[2] }} | |
strategy: | |
matrix: | |
options: | |
- [ubuntu-latest, '3.10', 'bash -l {0}'] | |
- [windows-2022, '3.10', "pwsh"] | |
- [macos-12, '3.10', 'bash -l {0}'] | |
steps: | |
- uses: prefix-dev/setup-pixi@v0.8.1 | |
with: | |
pixi-version: v0.28.2 | |
cache: true | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Cache rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "v1-rust" | |
cache-on-failure: True | |
- name: Install fonts on Linux | |
if: runner.os == 'Linux' | |
run: | | |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections | |
sudo apt-get install ttf-mscorefonts-installer | |
- name: Run tests | |
run: pixi run test-py | |