Skip to content

Commit c9e0596

Browse files
authored
Merge pull request webrtc-rs#261 from webrtc-rs/fix/windows-build-c-drive
Build windows on C:\ where github actions have more disk space
2 parents 6e2825a + 20a2d3a commit c9e0596

File tree

1 file changed

+47
-16
lines changed

1 file changed

+47
-16
lines changed

.github/workflows/cargo.yml

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,24 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
check_and_test:
14-
name: Check and test
13+
test:
14+
name: Test
1515
strategy:
1616
matrix:
17-
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
17+
os: ['ubuntu-latest', 'macos-latest']
1818
toolchain:
1919
- 1.57.0 # min supported version (https://github.com/webrtc-rs/webrtc/#toolchain)
2020
- stable
2121
runs-on: ${{ matrix.os }}
2222
steps:
2323
- uses: actions/checkout@v3
24+
- name: Install Rust ${{ matrix.toolchain }}
25+
uses: actions-rs/toolchain@v1
26+
with:
27+
toolchain: ${{ matrix.toolchain }}
28+
override: true
29+
- name: Install Rust
30+
run: rustup update stable
2431
- name: 📦 Cache cargo registry
2532
uses: actions/cache@v3
2633
with:
@@ -35,12 +42,45 @@ jobs:
3542
override: true
3643
- name: 🏭 Cache dependencies
3744
uses: Swatinem/rust-cache@v2
38-
- uses: actions-rs/cargo@v1
45+
- name: Test
46+
run: cargo test
47+
48+
test_windows:
49+
name: Test (windows)
50+
strategy:
51+
matrix:
52+
toolchain:
53+
- 1.57.0 # min supported version (https://github.com/webrtc-rs/webrtc/#toolchain)
54+
- stable
55+
runs-on: windows-latest
56+
steps:
57+
- uses: actions/checkout@v3
58+
- name: Install Rust ${{ matrix.toolchain }}
59+
uses: actions-rs/toolchain@v1
3960
with:
40-
command: check
41-
- uses: actions-rs/cargo@v1
61+
toolchain: ${{ matrix.toolchain }}
62+
override: true
63+
- name: Install Rust
64+
run: rustup update stable
65+
- name: 📦 Cache cargo registry
66+
uses: actions/cache@v3
4267
with:
43-
command: test
68+
path: ~/.cargo/registry
69+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
70+
restore-keys: |
71+
${{ runner.os }}-cargo-registry-
72+
- uses: actions-rs/toolchain@v1
73+
with:
74+
toolchain: ${{ matrix.toolchain }}
75+
profile: minimal
76+
override: true
77+
- name: Copy to C drive
78+
run: cp D:\a C:\ -Recurse
79+
# - name: 🏭 Cache dependencies
80+
# uses: Swatinem/rust-cache@v2
81+
- name: Test
82+
working-directory: "C:\\a\\webrtc\\webrtc"
83+
run: cargo test
4484

4585
rustfmt_and_clippy:
4686
name: Check formatting style and run clippy
@@ -81,17 +121,8 @@ jobs:
81121
with:
82122
toolchain: nightly
83123
override: true
84-
- name: 📦 Cache cargo registry
85-
uses: actions/cache@v3
86-
with:
87-
path: ~/.cargo/registry
88-
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
89-
restore-keys: |
90-
${{ runner.os }}-cargo-registry-
91124
- uses: taiki-e/install-action@cargo-hack
92125
- uses: taiki-e/install-action@cargo-minimal-versions
93-
- name: 🏭 Cache dependencies
94-
uses: Swatinem/rust-cache@v2
95126
- run: cargo minimal-versions check --workspace --all-features --ignore-private -v
96127
- run: cargo minimal-versions build --workspace --all-features --ignore-private -v
97128
- run: cargo minimal-versions test --workspace --all-features -v

0 commit comments

Comments
 (0)