Skip to content

Commit 73c41ee

Browse files
committed
ci: Modernize CI and add pixi build support
1 parent 15b210a commit 73c41ee

File tree

1 file changed

+48
-13
lines changed

1 file changed

+48
-13
lines changed

.github/workflows/macos-linux-windows-conda.yml

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: CI - MacOS/Linux/Windows via Pixi
22

33
on:
44
push:
5+
branches:
6+
- devel
57
paths-ignore:
68
- .gitignore
79
- '*.md'
@@ -19,29 +21,37 @@ concurrency:
1921

2022
jobs:
2123
loik-pixi:
22-
name: ${{ matrix.os }} - Env ${{ matrix.environment }} ${{ matrix.build_type }}
24+
name: Standard - ${{ matrix.os }} - Env ${{ matrix.environment }} ${{ matrix.build_type }}
2325
runs-on: ${{ matrix.os }}
2426
env:
2527
CCACHE_BASEDIR: ${GITHUB_WORKSPACE}
2628
CCACHE_DIR: ${GITHUB_WORKSPACE}/.ccache
2729
CCACHE_COMPRESS: true
2830
CCACHE_COMPRESSLEVEL: 6
31+
# Since pixi will install a compiler, the compiler mtime will be changed.
32+
# This can invalidate the cache (https://ccache.dev/manual/latest.html#config_compiler_check)
33+
CCACHE_COMPILERCHECK: content
2934

3035
strategy:
3136
fail-fast: false
3237
matrix:
3338
os: [ubuntu-latest, macos-latest, macos-15-intel]
34-
environment: [default]
39+
environment: [default, python-oldest]
3540
build_type: [Release, Debug]
3641

3742
include:
3843
- os: windows-latest
44+
build_type: Release
3945
environment: default
4046
- os: windows-latest
47+
build_type: Release
48+
environment: python-oldest
49+
- os: windows-latest
50+
build_type: Release
4151
environment: clang-cl
4252

4353
steps:
44-
- uses: actions/checkout@v4
54+
- uses: actions/checkout@v5
4555
with:
4656
submodules: recursive
4757

@@ -51,35 +61,60 @@ jobs:
5161
key: ccache-macos-linux-windows-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.environment }}-${{ github.sha }}
5262
restore-keys: ccache-macos-linux-windows-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.environment }}}
5363

54-
- uses: prefix-dev/[email protected].1
64+
- uses: prefix-dev/[email protected].3
5565
with:
5666
cache: true
5767
environments: ${{ matrix.environment }}
5868

59-
- name: Build LoIK [MacOS/Linux]
60-
shell: pixi run bash -el {0}
61-
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
69+
- name: Clear ccache statistics [MacOS/Linux/Windows]
70+
run: |
71+
pixi run -e ${{ matrix.environment }} ccache -z
72+
73+
- name: Build LoIK [MacOS/Linux/Windows]
74+
shell: bash -el {0}
6275
env:
63-
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
76+
LOIK_BUILD_TYPE: ${{ matrix.build_type }}
6477
CMAKE_BUILD_PARALLEL_LEVEL: 4
6578
run: |
6679
pixi run -e ${{ matrix.environment }} test
6780
68-
- name: Build LoIK [Windows]
69-
shell: pixi run bash -el {0}
70-
if: contains(matrix.os, 'windows')
81+
- name: Display ccache statistics [MacOS/Linux/Windows]
82+
shell: bash -el {0}
83+
run: |
84+
pixi run -e ${{ matrix.environment }} ccache -sv
85+
86+
loik-pixi-build:
87+
name: Pixi build - ${{ matrix.os }}
88+
runs-on: ${{ matrix.os }}
89+
90+
strategy:
91+
fail-fast: false
92+
matrix:
93+
os: [ubuntu-latest, macos-latest, macos-15-intel, windows-latest]
94+
95+
steps:
96+
- uses: actions/checkout@v5
97+
with:
98+
submodules: recursive
99+
100+
- uses: prefix-dev/[email protected]
71101
env:
72-
CMAKE_BUILD_TYPE: Release
73102
CMAKE_BUILD_PARALLEL_LEVEL: 4
103+
with:
104+
cache: true
105+
environments: test-pixi-build
106+
107+
- name: Test package [MacOS/Linux/Windows]
74108
run: |
75-
pixi run -e ${{ matrix.environment }} test
109+
pixi run -e test-pixi-build test
76110
77111
check:
78112
if: always()
79113
name: check-macos-linux-windows-pixi
80114

81115
needs:
82116
- loik-pixi
117+
- loik-pixi-build
83118

84119
runs-on: Ubuntu-latest
85120

0 commit comments

Comments
 (0)