GH Actions: Fix Windows build (#367)
* Remove continue-on-error cases * Skip integration tests for PR and master builds * Use gnu toolchain on windows * Use toolchain instead of target
This commit is contained in:
parent
3be0d1a8a0
commit
83d3d6f56c
|
@ -25,11 +25,12 @@ jobs:
|
|||
toolchain: stable
|
||||
override: true
|
||||
- uses: actions-rs/cargo@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
command: check
|
||||
args: --all --no-default-features --features ${{ matrix.feature }}
|
||||
|
||||
test:
|
||||
name: Test Suite
|
||||
strategy:
|
||||
fail-fast: false # all OSes should be tested even if one fails (default: true)
|
||||
matrix:
|
||||
|
@ -43,21 +44,36 @@ jobs:
|
|||
- uses: actions/setup-go@v3 # we need go to build go-waku
|
||||
with:
|
||||
go-version: '1.19'
|
||||
- uses: actions-rs/toolchain@v1
|
||||
# Setup Rust toolchain with GNU for Windows
|
||||
- name: Setup Rust with GNU toolchain (Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable-gnu
|
||||
override: true
|
||||
# Setup Rust toolchain for other OSes
|
||||
- name: Setup Rust toolchain (Other OSes)
|
||||
if: matrix.os != 'windows-latest'
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- uses: actions-rs/cargo@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
command: build
|
||||
args: --all --no-default-features --features ${{ matrix.feature }}
|
||||
# Freeup some space for Windows tests
|
||||
- name: Clean target dir (Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clean
|
||||
- uses: actions-rs/cargo@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
command: test
|
||||
args: --all --no-default-features --features ${{ matrix.feature }}
|
||||
args: --all --no-default-features --features ${{ matrix.feature }} -- --skip ten_nodes_happy --skip two_nodes_happy --skip ten_nodes_one_down
|
||||
|
||||
lints:
|
||||
name: Rust lints
|
||||
|
@ -77,14 +93,12 @@ jobs:
|
|||
|
||||
- name: Run cargo fmt
|
||||
uses: actions-rs/cargo@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
|
||||
- name: Run cargo clippy
|
||||
uses: actions-rs/cargo@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
command: clippy
|
||||
args: --all --no-default-features --features ${{ matrix.feature }} -- --deny warnings
|
||||
|
|
|
@ -25,7 +25,6 @@ jobs:
|
|||
toolchain: stable
|
||||
override: true
|
||||
- uses: actions-rs/cargo@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
command: check
|
||||
args: --all --no-default-features --features ${{ matrix.feature }}
|
||||
|
@ -46,21 +45,37 @@ jobs:
|
|||
- uses: actions/setup-go@v3 # we need go to build go-waku
|
||||
with:
|
||||
go-version: '1.19'
|
||||
- uses: actions-rs/toolchain@v1
|
||||
# Setup Rust toolchain with GNU for Windows
|
||||
- name: Setup Rust with GNU toolchain (Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable-gnu
|
||||
target: x86_64-pc-windows-gnu
|
||||
override: true
|
||||
# Setup Rust toolchain for other OSes
|
||||
- name: Setup Rust toolchain (Other OSes)
|
||||
if: matrix.os != 'windows-latest'
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- uses: actions-rs/cargo@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
command: build
|
||||
args: --all --no-default-features --features ${{ matrix.feature }}
|
||||
# Freeup some space for Windows tests
|
||||
- name: Clean target dir (Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clean
|
||||
- uses: actions-rs/cargo@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
command: test
|
||||
args: --all --no-default-features --features ${{ matrix.feature }}
|
||||
args: --all --no-default-features --features ${{ matrix.feature }} -- --skip ten_nodes_happy --skip two_nodes_happy --skip ten_nodes_one_down
|
||||
|
||||
lints:
|
||||
name: Rust lints
|
||||
|
@ -81,14 +96,12 @@ jobs:
|
|||
|
||||
- name: Run cargo fmt
|
||||
uses: actions-rs/cargo@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
|
||||
- name: Run cargo clippy
|
||||
uses: actions-rs/cargo@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
command: clippy
|
||||
args: --all --no-default-features --features ${{ matrix.feature }} -- --deny warnings
|
||||
|
|
Loading…
Reference in New Issue