@@ -5,6 +5,9 @@ on: [ push, pull_request ]
55permissions :
66 contents : read # to fetch code (actions/checkout)
77
8+ env :
9+ PIXI_VERSION : v0.77.0
10+
811concurrency :
912 group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1013 cancel-in-progress : true
@@ -18,35 +21,17 @@ jobs:
1821 matrix :
1922 runs-on : [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
2023 environment : [coverage]
21- env :
22- CCACHE_DIR : ${{ github.workspace }}/packages/coverage/.ccache
2324 steps :
24- - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25- - uses : ./.github/ccache
26- with :
27- key_segment : ${{ github.workflow }}-${{ matrix.environment }}-${{ matrix.runs-on }}
28- - name : Setup ${{ matrix.environment }} environment
29- uses : prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
25+ - name : Checkout xsf
26+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
27+ - name : Setup test environment
28+ uses : ./.github/setup-test-env
3029 with :
31- pixi-version : v0.77.0
32- cache : true
33- cache-key : pixi-v0-${{ github.job }}
34- environments : ${{ matrix.environment }}
35- - name : Ccache performance
36- shell : bash
37- run : pixi exec ccache -s
30+ environment : ${{ matrix.environment }}
3831 - name : Determine number of workers
39- run : |
40- if [[ "$RUNNER_OS" == "Linux" ]]; then
41- echo "NUM_WORKERS=$(nproc)" >> $GITHUB_ENV
42- elif [[ "$RUNNER_OS" == "macOS" ]]; then
43- echo "NUM_WORKERS=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
44- elif [[ "$RUNNER_OS" == "Windows" ]]; then
45- echo "NUM_WORKERS=$NUMBER_OF_PROCESSORS" >> "$GITHUB_ENV"
46- fi
47- shell : bash
32+ uses : ./.github/num-workers
4833 - name : Run tests
49- run : pixi run --environment=coverage tests $NUM_WORKERS
34+ run : pixi run --environment=${{ matrix.environment }} tests $NUM_WORKERS
5035 - name : Generate coverage report
5136 run : pixi run --skip-deps coverage
5237 - name : Upload HTML coverage report
@@ -64,33 +49,15 @@ jobs:
6449 matrix :
6550 runs-on : [windows-latest]
6651 environment : [tests-release]
67- env :
68- CCACHE_DIR : ${{ github.workspace }}/packages/tests-release/.ccache
6952 steps :
70- - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
71- - uses : ./.github/ccache
53+ - name : Checkout xsf
54+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
55+ - name : Setup test environment
56+ uses : ./.github/setup-test-env
7257 with :
73- key_segment : ${{ github.workflow }}-${{ matrix.environment }}-${{ matrix.runs-on }}
74- - name : Setup ${{ matrix.environment }} environment
75- uses : prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
76- with :
77- pixi-version : v0.77.0
78- cache : true
79- cache-key : pixi-v0-${{ github.job }}
80- environments : ${{ matrix.environment }}
81- - name : Ccache performance
82- shell : bash
83- run : pixi exec ccache -s
58+ environment : ${{ matrix.environment }}
8459 - name : Determine number of workers
85- run : |
86- if [[ "$RUNNER_OS" == "Linux" ]]; then
87- echo "NUM_WORKERS=$(nproc)" >> $GITHUB_ENV
88- elif [[ "$RUNNER_OS" == "macOS" ]]; then
89- echo "NUM_WORKERS=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
90- elif [[ "$RUNNER_OS" == "Windows" ]]; then
91- echo "NUM_WORKERS=$NUMBER_OF_PROCESSORS" >> "$GITHUB_ENV"
92- fi
93- shell : bash
60+ uses : ./.github/num-workers
9461 - name : Run tests
9562 run : pixi run --environment=${{ matrix.environment }} tests $NUM_WORKERS
9663
@@ -102,32 +69,14 @@ jobs:
10269 matrix :
10370 runs-on : [ubuntu-latest, ubuntu-24.04-arm]
10471 environment : [tests-debug]
105- env :
106- CCACHE_DIR : ${{ github.workspace }}/packages/tests-debug/.ccache
10772 steps :
108- - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
109- - uses : ./.github/ccache
110- with :
111- key_segment : ${{ github.workflow }}-${{ matrix.environment }}-${{ matrix.runs-on }}
112- - name : Setup ${{ matrix.environment }} environment
113- uses : prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
73+ - name : Checkout xsf
74+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
75+ - name : Setup test environment
76+ uses : ./.github/setup-test-env
11477 with :
115- pixi-version : v0.77.0
116- cache : true
117- cache-key : pixi-v0-${{ github.job }}
118- environments : ${{ matrix.environment }}
119- - name : Ccache performance
120- shell : bash
121- run : pixi exec ccache -s
78+ environment : ${{ matrix.environment }}
12279 - name : Determine number of workers
123- run : |
124- if [[ "$RUNNER_OS" == "Linux" ]]; then
125- echo "NUM_WORKERS=$(nproc)" >> $GITHUB_ENV
126- elif [[ "$RUNNER_OS" == "macOS" ]]; then
127- echo "NUM_WORKERS=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
128- elif [[ "$RUNNER_OS" == "Windows" ]]; then
129- echo "NUM_WORKERS=$NUMBER_OF_PROCESSORS" >> "$GITHUB_ENV"
130- fi
131- shell : bash
80+ uses : ./.github/num-workers
13281 - name : Run tests
13382 run : pixi run --environment=${{ matrix.environment }} tests $NUM_WORKERS
0 commit comments