Skip to content

Parser Benchmark

Parser Benchmark #181

Workflow file for this run

# Combined cargo check with LLVM installation for the three major platforms.
name: Cargo Check
on: ["push", "pull_request"]
# Cancel in-progress runs for previous commits if there are any that haven't completed yet.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check:
strategy:
fail-fast: false
matrix:
# Different features to check against on all platforms. Currently each group is one feature, since each
# depends on the previous, but more combinations could be added in the future.
features:
- none
- std
- source-tracking
- reporting
- file_memmap
- ast-model
- lexer
- parser
- wright_library_defaults
- wright_binary
os: [ubuntu-24.04, windows-latest, macos-latest]
shell: ["bash", "msys2 {0}"]
include:
- os: macos-latest
llvm-install-dir: /opt/homebrew/opt/llvm
exclude:
- os: windows-latest
shell: bash
- os: macos-latest
shell: 'msys2 {0}'
- os: ubuntu-24.04
shell: 'msys2 {0}'
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow-failure || false }}
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Checkout Wright source
uses: actions/checkout@v4
# Use MSYS2 on windows to install and check LLVM
- uses: msys2/setup-msys2@v2
if: ${{ matrix.os == 'windows-latest' }}
with:
update: true
# Use special mingw LLVM package.
# Also install the current stable rust
install: >-
mingw-w64-x86_64-llvm
mingw-w64-x86_64-rust
# Use stable Rust toolchain
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install LLVM (Ubuntu Only)
if: ${{ matrix.os == 'ubuntu-24.04' }}
# See: https://apt.llvm.org/
# Last line: https://gitlab.com/taricorp/llvm-sys.rs/-/issues/13
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18 all
sudo apt install libpolly-18-dev libz-dev
- name: Install LLVM 18 (Mac Only)
if: ${{ matrix.os == 'macos-latest' }}
run: brew install llvm@18
- name: Get the LLVM version (Windows Only)
if: ${{ matrix.os == 'windows-latest' }}
run: llvm-config --version
- name: Get the LLVM version (Mac Only)
if: ${{ matrix.os == 'macos-latest' }}
run: ${{ matrix.llvm-install-dir }}/bin/llvm-config --version
# For some reason, this seems to error even when llvm-config is available somewhere. Leaving it in for now.
continue-on-error: true
- name: Get the LLVM version (Ubuntu Only)
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: llvm-config --version
# For some reason, this seems to error even when llvm-config is available somewhere. Leaving it in for now.
continue-on-error: true
- name: Run cargo check (Mac Only)
if: ${{ matrix.os == 'macos-latest' }}
run: cargo check --no-default-features -F ${{ matrix.features }}
env:
LLVM_SYS_180_PREFIX: ${{ matrix.llvm-install-dir }}
- name: Run cargo check (Ubuntu & Windows)
if: ${{ matrix.os != 'macos-latest' }}
run: cargo check --no-default-features -F ${{ matrix.features }}