Skip to content

Commit 6e7ce84

Browse files
committed
Add workflows
1 parent 62fe081 commit 6e7ce84

File tree

2 files changed

+133
-0
lines changed

2 files changed

+133
-0
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Build on OSX/Linux via Pixi
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: 0 8 3 * *
7+
push:
8+
branches:
9+
- main
10+
paths-ignore:
11+
- 'doc/**'
12+
- 'scripts/**'
13+
- '.gitlab-ci.yml'
14+
- '.gitignore'
15+
- '**.md'
16+
- 'CITATION.cff'
17+
- 'CITATIONS.bib'
18+
pull_request:
19+
paths-ignore:
20+
- 'doc/'
21+
- 'scripts/'
22+
- '.gitlab-ci.yml'
23+
- '.gitignore'
24+
- '**.md'
25+
- 'CITATION.cff'
26+
- 'CITATIONS.bib'
27+
concurrency:
28+
group: ${{ github.workflow }}-${{ github.ref }}
29+
cancel-in-progress: true
30+
31+
jobs:
32+
aligator-example-pixi:
33+
name: ${{ matrix.os }} - Env ${{ matrix.environment }} ${{ matrix.build_type }}
34+
runs-on: ${{ matrix.os }}
35+
env:
36+
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
37+
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
38+
CCACHE_COMPRESS: true
39+
CCACHE_COMPRESSLEVEL: 6
40+
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
os: [ubuntu-latest, macos-latest, macos-13]
45+
environment: [default]
46+
build_type: [Release, Debug]
47+
48+
steps:
49+
- uses: actions/checkout@v4
50+
with:
51+
submodules: recursive
52+
53+
- uses: actions/cache@v4
54+
with:
55+
path: .ccache
56+
key: ccache-macos-linux-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ github.sha }}
57+
restore-keys: ccache-macos-linux-pixi-${{ matrix.os }}-${{ matrix.build_type }}-
58+
59+
- uses: prefix-dev/[email protected]
60+
with:
61+
cache: true
62+
environments: ${{ matrix.environment }}
63+
64+
- name: Build aligator-cmake-example-project
65+
shell: bash -l {0}
66+
env:
67+
CMAKE_BUILD_PARALLEL_LEVEL: 4
68+
ALCEP_BUILD_TYPE: ${{ matrix.build_type }}
69+
run: |
70+
pixi run -e ${{ matrix.environment }} build
71+
72+
check:
73+
name: check-macos-linux-pixi
74+
75+
needs:
76+
- aligator-example-pixi
77+
78+
runs-on: ubuntu-latest
79+
80+
steps:
81+
- name: Decide whether the needed jobs succeeded or failed
82+
uses: re-actors/alls-green@release/v1
83+
with:
84+
jobs: ${{ toJSON(needs) }}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI - Update Pixi lockfile
2+
permissions:
3+
contents: write
4+
pull-requests: write
5+
6+
on:
7+
workflow_dispatch:
8+
schedule:
9+
- cron: 0 5 1 * *
10+
11+
jobs:
12+
pixi-update:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/create-github-app-token@v1
17+
id: generate-token
18+
with:
19+
app-id: ${{ secrets.APP_ID }}
20+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
21+
22+
- uses: actions/checkout@v4
23+
with:
24+
token: ${{ steps.generate-token.outputs.token }}
25+
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
26+
persist-credentials: false
27+
28+
- name: Set up pixi
29+
uses: prefix-dev/[email protected]
30+
with:
31+
run-install: false
32+
33+
- name: Update lockfile
34+
run: |
35+
set -o pipefail
36+
pixi update --json | pixi exec pixi-diff-to-markdown >> diff.md
37+
38+
- name: Create pull request
39+
uses: peter-evans/create-pull-request@v7
40+
with:
41+
token: ${{ steps.generate-token.outputs.token }}
42+
commit-message: 'pixi: Update pixi lockfile'
43+
title: Update pixi lockfile
44+
body-path: diff.md
45+
branch: topic/update-pixi
46+
base: main
47+
labels: pixi
48+
delete-branch: true
49+
add-paths: pixi.lock

0 commit comments

Comments
 (0)