-
Notifications
You must be signed in to change notification settings - Fork 28
74 lines (68 loc) · 2.36 KB
/
pr.yml
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
# PR CI workflow for openslide-bin
name: Build PR
on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
pre-commit:
name: Rerun pre-commit checks
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Run pre-commit hooks
uses: pre-commit/[email protected]
setup:
name: Set up
runs-on: ubuntu-latest
outputs:
linux_builder_repo_and_digest: ${{ steps.find-linux.outputs.builder_repo_and_digest }}
suffix: ${{ steps.params.outputs.suffix }}
windows_builder_repo_and_digest: ${{ steps.find-windows.outputs.builder_repo_and_digest }}
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Find Linux builder container digest
id: find-linux
uses: ./.github/find-container-digest
with:
builder_image: linux
- name: Find Windows builder container digest
id: find-windows
uses: ./.github/find-container-digest
with:
builder_image: windows
- name: Calculate parameters
id: params
run: echo "suffix=$(date +%Y%m%d).bin.pr.${{ github.event.number }}.${{ github.run_number }}.${{ github.run_attempt }}.$(echo ${{ github.sha }} | cut -c-7)" >> $GITHUB_OUTPUT
stable:
name: Stable
needs: setup
uses: ./.github/workflows/build.yml
with:
linux_builder_repo_and_digest: ${{ needs.setup.outputs.linux_builder_repo_and_digest }}
macos_enable: true
openslide_bin_repo: ${{ github.repository }}
openslide_bin_ref: ${{ github.ref }}
suffix: ${{ needs.setup.outputs.suffix }}.stable
windows_builder_repo_and_digest: ${{ needs.setup.outputs.windows_builder_repo_and_digest }}
git:
name: Git
needs: setup
uses: ./.github/workflows/build.yml
with:
linux_builder_repo_and_digest: ${{ needs.setup.outputs.linux_builder_repo_and_digest }}
macos_enable: true
openslide_repo: openslide/openslide
openslide_ref: main
openslide_bin_repo: ${{ github.repository }}
openslide_bin_ref: ${{ github.ref }}
suffix: ${{ needs.setup.outputs.suffix }}.git
werror: true
windows_builder_repo_and_digest: ${{ needs.setup.outputs.windows_builder_repo_and_digest }}