-
Notifications
You must be signed in to change notification settings - Fork 3
80 lines (72 loc) · 2.34 KB
/
Copy pathbuild.yml
File metadata and controls
80 lines (72 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# imglib2-cellpose CI Build
#
# Caching Strategy:
# 1. Maven dependencies (via setup-java cache: 'maven')
# 2. Appose environments and tool binaries (~/.local/share/appose)
# - Includes pixi executable
# - Includes built cellpose environments
# 3. Pixi package cache (rattler cache):
# - Linux: ~/.cache/rattler/cache
# 4. uv package cache (used by pixi for PyPI dependencies):
# - Linux: ~/.cache/uv
#
# Cache keys are based on:
# - pom.xml hash (appose version changes)
# - src/main/resources/pixi.toml hash (environment spec changes)
name: build
on:
push:
branches:
- main
tags:
- "*-[0-9]+.*"
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
cache: 'maven'
- name: Cache Appose environments and tools
uses: actions/cache@v4
with:
path: ~/.local/share/appose
key: ${{ runner.os }}-appose-${{ hashFiles('pom.xml') }}-${{ hashFiles('src/main/resources/pixi.toml') }}
restore-keys: |
${{ runner.os }}-appose-${{ hashFiles('pom.xml') }}-
${{ runner.os }}-appose-
- name: Cache Pixi packages (Rattler cache)
uses: actions/cache@v4
with:
path: ~/.cache/rattler/cache
key: ${{ runner.os }}-pixi-pkgs-${{ hashFiles('src/main/resources/pixi.toml') }}
restore-keys: |
${{ runner.os }}-pixi-pkgs-
- name: Cache uv packages
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-uv-pkgs-${{ hashFiles('src/main/resources/pixi.toml') }}
restore-keys: |
${{ runner.os }}-uv-pkgs-
- name: Set up CI environment
run: .github/setup.sh
shell: bash
- name: Execute the build
run: .github/build.sh
shell: bash
env:
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
CENTRAL_USER: ${{ secrets.CENTRAL_USER }}
CENTRAL_PASS: ${{ secrets.CENTRAL_PASS }}
SIGNING_ASC: ${{ secrets.SIGNING_ASC }}