forked from n0-computer/iroh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f0e69e
commit 5d2cf72
Showing
1 changed file
with
82 additions
and
80 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,9 +33,11 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
name: [ubuntu-latest, macOS-arm-latest] | ||
# name: [ubuntu-latest, macOS-arm-latest] | ||
name: [ubuntu-latest] | ||
rust: [ '${{ inputs.rust-version }}' ] | ||
features: [all, none, default] | ||
# features: [all, none, default] | ||
features: [default] | ||
include: | ||
- name: ubuntu-latest | ||
os: ubuntu-latest | ||
|
@@ -114,7 +116,7 @@ jobs: | |
continue-on-error: true | ||
run: | | ||
mkdir -p output | ||
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --run-ignored ${{ inputs.flaky && 'all' || 'default' }} --no-fail-fast --message-format ${{ inputs.flaky && 'libtest-json' || 'human' }} > output/libtest.json | ||
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --run-ignored ${{ inputs.flaky && 'ignored-only' || 'default' }} --no-fail-fast --message-format ${{ inputs.flaky && 'libtest-json' || 'human' }} > output/libtest.json | ||
env: | ||
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}} | ||
NEXTEST_EXPERIMENTAL_LIBTEST_JSON: 1 | ||
|
@@ -138,80 +140,80 @@ jobs: | |
fi | ||
cargo test --workspace --all-features --doc | ||
build_and_test_windows: | ||
timeout-minutes: 30 | ||
name: "Tests" | ||
runs-on: ${{ matrix.runner }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
name: [windows-latest] | ||
rust: [ '${{ inputs.rust-version}}' ] | ||
features: [all, none, default] | ||
target: | ||
- x86_64-pc-windows-msvc | ||
include: | ||
- name: windows-latest | ||
os: windows | ||
runner: [self-hosted, windows, x64] | ||
env: | ||
# Using self-hosted runners so use local cache for sccache and | ||
# not SCCACHE_GHA_ENABLED. | ||
RUSTC_WRAPPER: "sccache" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.git-ref }} | ||
|
||
- name: Install ${{ matrix.rust }} | ||
run: | | ||
rustup toolchain install ${{ matrix.rust }} | ||
rustup toolchain default ${{ matrix.rust }} | ||
rustup target add ${{ matrix.target }} | ||
rustup set default-host ${{ matrix.target }} | ||
- name: Install cargo-nextest | ||
shell: powershell | ||
run: | | ||
$tmp = New-TemporaryFile | Rename-Item -NewName { $_ -replace 'tmp$', 'zip' } -PassThru | ||
Invoke-WebRequest -OutFile $tmp https://get.nexte.st/latest/windows | ||
$outputDir = if ($Env:CARGO_HOME) { Join-Path $Env:CARGO_HOME "bin" } else { "~/.cargo/bin" } | ||
$tmp | Expand-Archive -DestinationPath $outputDir -Force | ||
$tmp | Remove-Item | ||
- name: Select features | ||
run: | | ||
switch ("${{ matrix.features }}") { | ||
"all" { | ||
echo "FEATURES=--all-features" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
} | ||
"none" { | ||
echo "FEATURES=--no-default-features" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
} | ||
"default" { | ||
echo "FEATURES=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
} | ||
default { | ||
Exit 1 | ||
} | ||
} | ||
- name: Install sccache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- uses: msys2/setup-msys2@v2 | ||
|
||
- name: build tests | ||
run: | | ||
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --target ${{ matrix.target }} --no-run | ||
- name: list ignored tests | ||
run: | | ||
cargo nextest list --workspace ${{ env.FEATURES }} --lib --bins --tests --target ${{ matrix.target }} --run-ignored ignored-only | ||
- name: tests | ||
run: | | ||
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --target ${{ matrix.target }} --run-ignored ${{ inputs.flaky && 'all' || 'default' }} --no-fail-fast | ||
env: | ||
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}} | ||
# build_and_test_windows: | ||
# timeout-minutes: 30 | ||
# name: "Tests" | ||
# runs-on: ${{ matrix.runner }} | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# name: [windows-latest] | ||
# rust: [ '${{ inputs.rust-version}}' ] | ||
# features: [all, none, default] | ||
# target: | ||
# - x86_64-pc-windows-msvc | ||
# include: | ||
# - name: windows-latest | ||
# os: windows | ||
# runner: [self-hosted, windows, x64] | ||
# env: | ||
# # Using self-hosted runners so use local cache for sccache and | ||
# # not SCCACHE_GHA_ENABLED. | ||
# RUSTC_WRAPPER: "sccache" | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# ref: ${{ inputs.git-ref }} | ||
# | ||
# - name: Install ${{ matrix.rust }} | ||
# run: | | ||
# rustup toolchain install ${{ matrix.rust }} | ||
# rustup toolchain default ${{ matrix.rust }} | ||
# rustup target add ${{ matrix.target }} | ||
# rustup set default-host ${{ matrix.target }} | ||
# | ||
# - name: Install cargo-nextest | ||
# shell: powershell | ||
# run: | | ||
# $tmp = New-TemporaryFile | Rename-Item -NewName { $_ -replace 'tmp$', 'zip' } -PassThru | ||
# Invoke-WebRequest -OutFile $tmp https://get.nexte.st/latest/windows | ||
# $outputDir = if ($Env:CARGO_HOME) { Join-Path $Env:CARGO_HOME "bin" } else { "~/.cargo/bin" } | ||
# $tmp | Expand-Archive -DestinationPath $outputDir -Force | ||
# $tmp | Remove-Item | ||
# | ||
# - name: Select features | ||
# run: | | ||
# switch ("${{ matrix.features }}") { | ||
# "all" { | ||
# echo "FEATURES=--all-features" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
# } | ||
# "none" { | ||
# echo "FEATURES=--no-default-features" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
# } | ||
# "default" { | ||
# echo "FEATURES=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
# } | ||
# default { | ||
# Exit 1 | ||
# } | ||
# } | ||
# | ||
# - name: Install sccache | ||
# uses: mozilla-actions/[email protected] | ||
# | ||
# - uses: msys2/setup-msys2@v2 | ||
# | ||
# - name: build tests | ||
# run: | | ||
# cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --target ${{ matrix.target }} --no-run | ||
# | ||
# - name: list ignored tests | ||
# run: | | ||
# cargo nextest list --workspace ${{ env.FEATURES }} --lib --bins --tests --target ${{ matrix.target }} --run-ignored ignored-only | ||
# | ||
# - name: tests | ||
# run: | | ||
# cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --target ${{ matrix.target }} --run-ignored ${{ inputs.flaky && 'all' || 'default' }} --no-fail-fast | ||
# env: | ||
# RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}} |