mirror of
https://github.com/Devolutions/IronRDP.git
synced 2025-12-23 12:26:46 +00:00
Some checks are pending
CI / Check formatting (push) Waiting to run
CI / Check typos (push) Waiting to run
CI / Checks [linux] (push) Blocked by required conditions
CI / Checks [macos] (push) Blocked by required conditions
CI / Checks [windows] (push) Blocked by required conditions
CI / Fuzzing (push) Blocked by required conditions
CI / Web Client (push) Blocked by required conditions
CI / FFI (push) Blocked by required conditions
CI / Success (push) Blocked by required conditions
Coverage / Coverage Report (push) Waiting to run
Release crates / Open release PR (push) Waiting to run
Release crates / Release crates (push) Waiting to run
Issue: DEVOPS-3952
215 lines
5.5 KiB
YAML
215 lines
5.5 KiB
YAML
name: CI
|
||
|
||
on:
|
||
push:
|
||
branches:
|
||
- master
|
||
pull_request:
|
||
types: [opened, synchronize, reopened]
|
||
workflow_dispatch:
|
||
|
||
env:
|
||
# Disable incremental compilation. CI builds are often closer to from-scratch builds, as changes
|
||
# are typically bigger than from a local edit-compile cycle.
|
||
# Incremental compilation also significantly increases the amount of IO and the size of ./target
|
||
# folder, which makes caching less effective.
|
||
CARGO_INCREMENTAL: 0
|
||
CARGO_NET_RETRY: 10
|
||
RUSTUP_MAX_RETRIES: 10
|
||
RUST_BACKTRACE: short
|
||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
||
# Cache should never takes more than a few seconds to get downloaded.
|
||
# If it does, let’s just rebuild from scratch instead of hanging "forever".
|
||
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
|
||
# Disabling debug info so compilation is faster and ./target folder is smaller.
|
||
CARGO_PROFILE_DEV_DEBUG: 0
|
||
|
||
jobs:
|
||
formatting:
|
||
name: Check formatting
|
||
runs-on: ubuntu-latest
|
||
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- name: Check formatting
|
||
run: cargo xtask check fmt -v
|
||
|
||
typos:
|
||
name: Check typos
|
||
runs-on: ubuntu-latest
|
||
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- name: Binary cache
|
||
uses: actions/cache@v4
|
||
with:
|
||
path: ./.cargo/local_root/bin
|
||
key: ${{ runner.os }}-bin-${{ github.job }}-${{ hashFiles('xtask/src/bin_version.rs') }}
|
||
|
||
- name: typos (prepare)
|
||
run: cargo xtask check install -v
|
||
|
||
- name: typos (check)
|
||
run: cargo xtask check typos -v
|
||
|
||
checks:
|
||
name: Checks [${{ matrix.os }}]
|
||
needs: [formatting]
|
||
runs-on: ${{ matrix.runner }}
|
||
strategy:
|
||
fail-fast: false
|
||
matrix:
|
||
os: [windows, linux, macos]
|
||
include:
|
||
- os: windows
|
||
runner: windows-latest
|
||
- os: linux
|
||
runner: ubuntu-latest
|
||
- os: macos
|
||
runner: macos-latest
|
||
|
||
steps:
|
||
- name: Checkout
|
||
uses: actions/checkout@v4
|
||
|
||
- name: Install devel packages
|
||
if: ${{ runner.os == 'Linux' }}
|
||
run: |
|
||
sudo apt-get -y install libasound2-dev
|
||
|
||
- name: Install NASM
|
||
if: ${{ runner.os == 'Windows' }}
|
||
run: |
|
||
choco install nasm
|
||
$Env:PATH += ";$Env:ProgramFiles\NASM"
|
||
echo "PATH=$Env:PATH" >> $Env:GITHUB_ENV
|
||
shell: pwsh
|
||
|
||
- name: Rust cache
|
||
uses: Swatinem/rust-cache@v2.7.3
|
||
|
||
- name: Binary cache
|
||
uses: actions/cache@v4
|
||
with:
|
||
path: ./.cargo/local_root/bin
|
||
key: ${{ runner.os }}-bin-${{ github.job }}-${{ hashFiles('xtask/src/bin_version.rs') }}
|
||
|
||
# Compilation is separated from execution so we know exactly the time for each step.
|
||
|
||
- name: Tests (compile)
|
||
run: cargo xtask check tests --no-run -v
|
||
|
||
- name: Tests (run)
|
||
run: cargo xtask check tests -v
|
||
|
||
- name: Lints
|
||
run: cargo xtask check lints -v
|
||
|
||
- name: WASM (prepare)
|
||
run: cargo xtask wasm install -v
|
||
|
||
- name: WASM (check)
|
||
run: cargo xtask wasm check -v
|
||
|
||
- name: Lock files
|
||
run: cargo xtask check locks -v
|
||
|
||
fuzz:
|
||
name: Fuzzing
|
||
needs: [formatting]
|
||
runs-on: ubuntu-latest
|
||
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- name: Rust cache
|
||
uses: Swatinem/rust-cache@v2.7.3
|
||
with:
|
||
workspaces: fuzz -> target
|
||
|
||
- name: Binary cache
|
||
uses: actions/cache@v4
|
||
with:
|
||
path: ./.cargo/local_root/bin
|
||
key: ${{ runner.os }}-bin-${{ github.job }}-${{ hashFiles('xtask/src/bin_version.rs') }}
|
||
|
||
- name: Prepare
|
||
run: cargo xtask fuzz install -v
|
||
|
||
# Simply run all fuzz targets for a few seconds, just checking there is nothing obviously wrong at a quick glance
|
||
- name: Fuzz
|
||
run: cargo xtask fuzz run -v
|
||
|
||
- name: Lock files
|
||
run: cargo xtask check locks -v
|
||
|
||
web:
|
||
name: Web Client
|
||
needs: [formatting]
|
||
runs-on: ubuntu-latest
|
||
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- name: Rust cache
|
||
uses: Swatinem/rust-cache@v2.7.3
|
||
|
||
- name: Binary cache
|
||
uses: actions/cache@v4
|
||
with:
|
||
path: ./.cargo/local_root/bin
|
||
key: ${{ runner.os }}-bin-${{ github.job }}-${{ hashFiles('xtask/src/bin_version.rs') }}
|
||
|
||
- name: Prepare
|
||
run: cargo xtask web install -v
|
||
|
||
- name: Check
|
||
run: cargo xtask web check -v
|
||
|
||
- name: Lock files
|
||
run: cargo xtask check locks -v
|
||
|
||
ffi:
|
||
name: FFI
|
||
needs: [formatting]
|
||
runs-on: ubuntu-latest
|
||
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- name: Rust cache
|
||
uses: Swatinem/rust-cache@v2.7.3
|
||
|
||
- name: Binary cache
|
||
uses: actions/cache@v4
|
||
with:
|
||
path: ./.cargo/local_root/bin
|
||
key: ${{ runner.os }}-bin-${{ github.job }}-${{ hashFiles('xtask/src/bin_version.rs') }}
|
||
|
||
- name: Prepare runner
|
||
run: cargo xtask ffi install -v
|
||
|
||
- name: Build native library
|
||
run: cargo xtask ffi build -v
|
||
|
||
- name: Generate bindings
|
||
run: cargo xtask ffi bindings -v
|
||
|
||
- name: Build .NET projects
|
||
run: cd ./ffi/dotnet && dotnet build
|
||
|
||
success:
|
||
name: Success
|
||
if: ${{ always() }}
|
||
needs: [formatting, typos, checks, fuzz, web, ffi]
|
||
runs-on: ubuntu-latest
|
||
|
||
steps:
|
||
- name: Check success
|
||
run: |
|
||
$results = '${{ toJSON(needs.*.result) }}' | ConvertFrom-Json
|
||
$succeeded = $($results | Where { $_ -Ne "success" }).Count -Eq 0
|
||
exit $(if ($succeeded) { 0 } else { 1 })
|
||
shell: pwsh
|