Repository navigation
48 lines (45 loc) · 1.85 KB
/
Copy pathci.yml
File metadata and controls
48 lines (45 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: IronRust CI
on:
push:
pull_request:
permissions:
contents: read
jobs:
dotnet:
name: .NET build and tests
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Native compiler fmt
run: cargo fmt --all --check --manifest-path native/pd-vm-compiler/Cargo.toml
- name: Native compiler clippy
run: cargo clippy --locked --all-targets --all-features --target-dir native/pd-vm-compiler/target/parity-tests --manifest-path native/pd-vm-compiler/Cargo.toml -- -D warnings
- name: Test native compiler
run: cargo test --locked --release --all-targets --all-features --target-dir native/pd-vm-compiler/target/parity-tests --manifest-path native/pd-vm-compiler/Cargo.toml -- --test-threads=1
- name: Check compiler-only dependencies
shell: pwsh
run: ./scripts/check-native-compiler.ps1
- name: Build native compiler
run: cargo build --locked --release --lib --manifest-path native/pd-vm-compiler/Cargo.toml
- name: Select native compiler library
shell: pwsh
run: |
$nativeName = if ($IsWindows) { 'pd_vm_compiler.dll' } else { 'libpd_vm_compiler.so' }
"PDVM_NATIVE_COMPILER=$env:GITHUB_WORKSPACE/native/pd-vm-compiler/target/release/$nativeName" >> $env:GITHUB_ENV
- name: Restore
run: dotnet restore IronRust.sln
- name: Build
run: dotnet build IronRust.sln --no-restore --configuration Release
- name: Tests
run: dotnet test IronRust.sln --no-build --configuration Release --verbosity normal