Skip to content

Commit

Permalink
get tests back in full
Browse files Browse the repository at this point in the history
  • Loading branch information
flub committed Jan 11, 2024
1 parent bd86025 commit 59979fd
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 79 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,13 @@ jobs:
result=$(echo '${{ toJSON(needs) }}' | jq -r .tests.result)
echo TESTS_RESULT=$result
echo "TESTS_RESULT=$result" >>"$GITHUB_ENV"
- run: |
echo ${{ env.TESTS_RESULT == 'failure' }}
echo ${{ env.TESTS_RESULT != 'failure' }}
- name: Notify discord on failure
uses: n0-computer/discord-webhook-notify@v1
if: ${{ env.TESTS_RESULT == 'failure' }}
with:
severity: error
details: |
rustc beta tests failed
see https://github.com/n0-computer/iroh/actions/workflows/beta.yaml
Rustc beta tests failed
See https://github.com/n0-computer/iroh/actions/workflows/beta.yaml
webhookUrl: ${{ secrets.DISCORD_N0_GITHUB_CHANNEL_WEBHOOK_URL }}

148 changes: 74 additions & 74 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ jobs:
release-os: linux
release-arch: amd64
runner: [self-hosted, linux, X64]
# - name: macOS-arm-latest
# os: macOS-latest
# release-os: darwin
# release-arch: aarch64
# runner: [self-hosted, macOS, ARM64]
- name: macOS-arm-latest
os: macOS-latest
release-os: darwin
release-arch: aarch64
runner: [self-hosted, macOS, ARM64]
env:
# Using self-hosted runners so use local cache for sccache and
# not SCCACHE_GHA_ENABLED.
Expand Down Expand Up @@ -112,72 +112,72 @@ jobs:
# TODO: just to test the workflow
false
# 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: tests
# run: |
# cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --target ${{ matrix.target }} ${{ inputs.flaky && '--run-ignored all' }}
# env:
# RUST_LOG: "TRACE"
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: tests
run: |
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --target ${{ matrix.target }} ${{ inputs.flaky && '--run-ignored all' }}
env:
RUST_LOG: "TRACE"

0 comments on commit 59979fd

Please sign in to comment.