Skip to content

Commit

Permalink
kill windows, reduce tested area
Browse files Browse the repository at this point in the history
  • Loading branch information
divagant-martian committed Jul 11, 2024
1 parent 8f0e69e commit 5d2cf72
Showing 1 changed file with 82 additions and 80 deletions.
162 changes: 82 additions & 80 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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'}}

0 comments on commit 5d2cf72

Please sign in to comment.