feat: parsing & hir of impl blocks #1860
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: | |
pull_request: | |
push: | |
branches: | |
- main | |
- release/* | |
env: | |
RUSTFLAGS: -Dwarnings | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install libasound2-dev libudev-dev | |
- name: Install Rust (stable) | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: true | |
- name: Install LLVM | |
uses: ./.github/actions/install-llvm | |
- uses: Swatinem/rust-cache@v2 | |
- name: Cargo check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all-targets | |
test: | |
name: Test Rust | |
runs-on: ${{ matrix.os }} | |
needs: check | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "windows-latest", "macOS-latest"] | |
include: | |
- RUSTFLAGS: "-Dwarnings" | |
CARGO_INCREMENTAL: 1 | |
CARGO_TARGET_DIR: "target" | |
- os: "windows-latest" | |
RUSTFLAGS: "-Dwarnings -Ctarget-feature=+crt-static" | |
CARGO_INCREMENTAL: 0 | |
CARGO_TARGET_DIR: "C:\\cargo-target-dir" | |
env: | |
RUSTFLAGS: ${{ matrix.RUSTFLAGS }} | |
CARGO_INCREMENTAL: ${{ matrix.CARGO_INCREMENTAL }} | |
# Disable generating debug info, we don't need it here anyway and its only using disk space | |
CARGO_PROFILE_DEV_DEBUG: 0 | |
CARGO_TARGET_DIR: ${{ matrix.CARGO_TARGET_DIR }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install packages | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install libasound2-dev libudev-dev | |
- name: Install LLVM | |
uses: ./.github/actions/install-llvm | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: true | |
components: rustfmt, llvm-tools-preview | |
- uses: Swatinem/rust-cache@v2 | |
if: matrix.os != 'windows-latest' | |
- name: Install latest llvm-cov release | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Install latest nextest release | |
uses: taiki-e/install-action@nextest | |
- name: Test with latest nextest release | |
uses: actions-rs/cargo@v1 | |
with: | |
command: llvm-cov | |
args: nextest --all-features --workspace --lcov --output-path lcov.info --profile ci | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: lcov.info | |
name: ${{ matrix.os }} | |
fail_ci_if_error: true | |
doctest: | |
name: Doctest Rust | |
needs: check | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "windows-latest", "macOS-latest"] | |
include: | |
- RUSTFLAGS: "-Dwarnings" | |
CARGO_INCREMENTAL: 1 | |
- os: "windows-latest" | |
RUSTFLAGS: "-Dwarnings -Ctarget-feature=+crt-static" | |
CARGO_INCREMENTAL: 0 | |
env: | |
RUSTFLAGS: ${{ matrix.RUSTFLAGS }} | |
CARGO_INCREMENTAL: ${{ matrix.CARGO_INCREMENTAL }} | |
# Disable generating debug info, we don't need it here anyway and its only using disk space | |
CARGO_PROFILE_DEV_DEBUG: 0 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install LLVM | |
uses: ./.github/actions/install-llvm | |
- name: Install packages | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install libasound2-dev libudev-dev | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
- uses: Swatinem/rust-cache@v2 | |
- name: Doctests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --doc --all-features | |
test-mdbook: | |
name: Test mdbook | |
runs-on: ubuntu-latest | |
needs: check | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install LLVM | |
uses: ./.github/actions/install-llvm | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: true | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- name: Cargo build | |
uses: actions-rs/cargo@v1 | |
env: | |
RUSTFLAGS: ${{ matrix.RUSTFLAGS }} | |
with: | |
command: build | |
args: -p mun_runtime | |
- name: Install mdbook | |
uses: actions-rs/[email protected] | |
with: | |
crate: mdbook | |
version: 0.4.21 | |
use-tool-cache: true | |
- name: mdbook test | |
run: mdbook test book -L target/debug/deps | |
- name: mdbook build | |
run: mdbook build book | |
test-cpp: | |
name: Test C++ Runtime | |
runs-on: ${{ matrix.os }} | |
needs: check | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "windows-latest", "macOS-latest"] | |
include: | |
- RUSTFLAGS: "-Dwarnings" | |
- os: "windows-latest" | |
RUSTFLAGS: "-Dwarnings -Ctarget-feature=+crt-static" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install LLVM | |
uses: ./.github/actions/install-llvm | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: true | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- name: Cargo build | |
uses: actions-rs/cargo@v1 | |
env: | |
RUSTFLAGS: ${{ matrix.RUSTFLAGS }} | |
with: | |
command: build | |
args: -p mun -p mun_runtime_capi | |
- name: Create build folder (debug) | |
run: cmake -E make_directory ${{ runner.workspace }}/build/debug | |
- name: Create build folder (release) | |
run: cmake -E make_directory ${{ runner.workspace }}/build/release | |
- name: Configure cmake (debug) | |
working-directory: ${{ runner.workspace }}/build/debug | |
run: cmake -DCMAKE_BUILD_TYPE=Debug -S ${{ github.workspace }} -Dmun_build_examples=ON -Dmun_build_tests=ON -Dmun_binaries_path=${{ github.workspace }}/target/debug/ -Dmun_examples_path=${{ github.workspace }}/examples | |
- name: Configure cmake (release) | |
working-directory: ${{ runner.workspace }}/build/release | |
run: cmake -DCMAKE_BUILD_TYPE=Release -S ${{ github.workspace }} -Dmun_build_examples=ON -Dmun_build_tests=ON -Dmun_binaries_path=${{ github.workspace }}/target/debug/ -Dmun_examples_path=${{ github.workspace }}/examples | |
- name: Build (debug) | |
working-directory: ${{ runner.workspace }}/build/debug | |
run: cmake --build . --config Debug | |
- name: Build (release) | |
working-directory: ${{ runner.workspace }}/build/release | |
run: cmake --build . --config Release | |
- name: Test (debug) | |
working-directory: ${{ runner.workspace }}/build/debug | |
run: ctest -C Debug | |
- name: Test (release) | |
working-directory: ${{ runner.workspace }}/build/release | |
run: ctest -C Release | |
style: | |
name: Check Style | |
runs-on: ubuntu-latest | |
needs: check | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: true | |
components: clippy, rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Install LLVM | |
uses: ./.github/actions/install-llvm | |
- name: Run cargo clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features |