Skip to content

Commit dd10c2f

Browse files
committed
os grouped
1 parent 44a7b75 commit dd10c2f

File tree

2 files changed

+48
-18
lines changed

2 files changed

+48
-18
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: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,28 +60,23 @@ jobs:
6060
run: python .github/scripts/ci_config.py verify-groups
6161

6262
test:
63-
name: "test: ${{ matrix.group }} (${{ matrix.os }})"
63+
name: ${{ matrix.name }}
6464
needs: verify-execution
65-
runs-on: ${{ matrix.os }}
6665
strategy:
6766
fail-fast: false
6867
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 }}
68+
include:
69+
- os: ubuntu-latest
70+
name: Ubuntu
71+
- os: ubuntu-22.04-arm
72+
name: Ubuntu ARM
73+
- os: macos-latest
74+
name: macOS
75+
- os: windows-latest
76+
name: Windows
77+
uses: ./.github/workflows/reusable/build-and-test.yml
78+
with:
79+
os: ${{ matrix.os }}
8580

8681
no-std:
8782
name: No-std Checks

0 commit comments

Comments
 (0)