Skip to content

Commit eed1f9f

Browse files
committed
os grouped
1 parent 44a7b75 commit eed1f9f

File tree

2 files changed

+61
-22
lines changed

2 files changed

+61
-22
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and Test
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
os:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
test:
12+
name: ${{ matrix.group }}
13+
runs-on: ${{ inputs.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
group: [core, spv, wallet, rpc, tools]
18+
steps:
19+
- uses: actions/checkout@v6
20+
- name: Disable Windows Defender real-time monitoring
21+
if: runner.os == 'Windows'
22+
run: Set-MpPreference -DisableRealtimeMonitoring $true
23+
shell: pwsh
24+
- uses: dtolnay/rust-toolchain@stable
25+
- uses: Swatinem/rust-cache@v2
26+
with:
27+
shared-key: "test-${{ inputs.os }}-${{ matrix.group }}"
28+
- uses: actions/setup-python@v5
29+
with:
30+
python-version: "3.12"
31+
cache: "pip"
32+
cache-dependency-path: .github/scripts/requirements.txt
33+
- run: pip install -r .github/scripts/requirements.txt
34+
- name: Run tests
35+
run: python .github/scripts/ci_config.py run-group ${{ matrix.group }} --os ${{ inputs.os }}

.github/workflows/rust.yml

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -59,29 +59,33 @@ jobs:
5959
- name: Check all crates are assigned to test groups
6060
run: python .github/scripts/ci_config.py verify-groups
6161

62-
test:
63-
name: "test: ${{ matrix.group }} (${{ matrix.os }})"
62+
test-ubuntu:
63+
name: Ubuntu
6464
needs: verify-execution
65-
runs-on: ${{ matrix.os }}
66-
strategy:
67-
fail-fast: false
68-
matrix:
69-
os: [ubuntu-latest, ubuntu-22.04-arm, macos-latest, windows-latest]
70-
group: [core, spv, wallet, rpc, tools]
71-
steps:
72-
- uses: actions/checkout@v6
73-
- uses: dtolnay/rust-toolchain@stable
74-
- uses: Swatinem/rust-cache@v2
75-
with:
76-
shared-key: "test-${{ matrix.os }}-${{ matrix.group }}"
77-
- uses: actions/setup-python@v5
78-
with:
79-
python-version: "3.12"
80-
cache: "pip"
81-
cache-dependency-path: .github/scripts/requirements.txt
82-
- run: pip install -r .github/scripts/requirements.txt
83-
- name: Run tests
84-
run: python .github/scripts/ci_config.py run-group ${{ matrix.group }} --os ${{ matrix.os }}
65+
uses: ./.github/workflows/build-and-test.yml
66+
with:
67+
os: ubuntu-latest
68+
69+
test-ubuntu-arm:
70+
name: Ubuntu ARM
71+
needs: verify-execution
72+
uses: ./.github/workflows/build-and-test.yml
73+
with:
74+
os: ubuntu-22.04-arm
75+
76+
test-macos:
77+
name: macOS
78+
needs: verify-execution
79+
uses: ./.github/workflows/build-and-test.yml
80+
with:
81+
os: macos-latest
82+
83+
test-windows:
84+
name: Windows
85+
needs: verify-execution
86+
uses: ./.github/workflows/build-and-test.yml
87+
with:
88+
os: windows-latest
8589

8690
no-std:
8791
name: No-std Checks

0 commit comments

Comments
 (0)