Skip to content

Migrate development environment to Pixi #531

Migrate development environment to Pixi

Migrate development environment to Pixi #531

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
python-fmt:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.28.2
- name: Check cargo fmt compliance
run: pixi run fmt-py-check
rust-fmt-clippy:
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-D warnings"
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.28.2
- 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:
- name: Check out repository code
uses: actions/checkout@v2
- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.28.2
- 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:
- name: Check out repository code
uses: actions/checkout@v2
- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.28.2
- 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:
- name: Check out repository code
uses: actions/checkout@v2
- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.28.2
- 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: Rustc info
run: pixi run "rustc -vV"
- name: Check glibc version
if: runner.os == 'Linux'
run: |
ldd --version
ldd $(which rustc) | grep libc
- 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:
- name: Check out repository code
uses: actions/checkout@v2
- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.28.2
- 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: Build package
run: pixi run dev-py
- name: Run tests
run: pixi run test-py