diff --git a/.github/workflows/beta.yaml b/.github/workflows/beta.yaml new file mode 100644 index 00000000000..cc8988c8533 --- /dev/null +++ b/.github/workflows/beta.yaml @@ -0,0 +1,40 @@ +# Run tests using the beta Rust compiler + +name: Beta Rust + +on: + schedule: + # 06:50 UTC every Monday + - cron: '50 6 * * 1' + workflow_dispatch: + +concurrency: + group: beta-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + tests: + uses: './.github/workflows/tests.yaml' + with: + rust-version: beta + notify: + needs: tests + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Extract test results + run: | + printf '${{ toJSON(needs) }}\n' + result=$(echo '${{ toJSON(needs) }}' | jq -r .tests.result) + echo TESTS_RESULT=$result + echo "TESTS_RESULT=$result" >>"$GITHUB_ENV" + - 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 + webhookUrl: ${{ secrets.DISCORD_N0_GITHUB_CHANNEL_WEBHOOK_URL }} + diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 89951e066c4..40cbed459d5 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -5,6 +5,10 @@ name: Tests on: workflow_call: inputs: + rust-version: + description: 'The version of the rust compiler to run' + type: string + default: 'stable' flaky: description: 'Whether to also run flaky tests' type: boolean @@ -29,7 +33,7 @@ jobs: fail-fast: false matrix: name: [ubuntu-latest, macOS-arm-latest] - rust: [nightly, stable] + rust: [ '${{ inputs.rust-version }}' ] features: [all, none, default] include: - name: ubuntu-latest @@ -52,7 +56,7 @@ jobs: with: ref: ${{ inputs.git-ref }} - - name: Install ${{ matrix.rust }} + - name: Install ${{ matrix.rust }} rust uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} @@ -114,7 +118,7 @@ jobs: fail-fast: false matrix: name: [windows-latest] - rust: [nightly, stable] + rust: [ '${{ inputs.rust-version}}' ] features: [all, none, default] target: - x86_64-pc-windows-msvc