-
Notifications
You must be signed in to change notification settings - Fork 345
75 lines (70 loc) · 2.44 KB
/
build_pacman_repo.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
75
name: Build pacman repo
on:
workflow_dispatch: {}
pull_request:
paths:
- 'tools/MINGW-packages/**'
- '.github/workflows/build_pacman_repo.yml'
push:
paths:
- 'tools/MINGW-packages/**'
- '.github/workflows/build_pacman_repo.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
cache-name: cache-natron-repo
jobs:
build_repo:
name: Build pacman repo
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout branch
uses: actions/checkout@v4.1.1
with:
submodules: recursive
- name: Setup MinGW environment
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: git base-devel
- name: Install Inno Setup
run: choco install innosetup
shell: pwsh
- name: Prep MinGW package version list
run: |
pacman -Sl mingw64 msys > mingw-package-version-list.txt
- name: Restore natron repo directory from cache
id: restore-natron-repo-cache
uses: actions/cache/restore@v4.0.0
with:
path: natron_repo
key: ${{ env.cache-name }}-${{ hashFiles('mingw-package-version-list.txt', 'tools/MINGW-packages/**/PKGBUILD') }}
- name: Build natron package repo
id: build-package-repo
# Allow continuing after error so cache gets updated and makes reruns faster.
continue-on-error: true
run: |
tools/MINGW-packages/build_natron_package_repo.sh natron_repo
REPO_VERSION=`cat ${GITHUB_WORKSPACE}/tools/MINGW-packages/windows_pacman_repo_version.txt`
echo "REPO_VERSION=${REPO_VERSION}" >> "$GITHUB_OUTPUT"
- name: Save natron repo directory to cache
id: save-natron-repo-cache
uses: actions/cache/save@v4.0.0
# save even if build fails.
if: always()
with:
path: natron_repo
key: ${{ env.cache-name }}-${{ hashFiles('mingw-package-version-list.txt', 'tools/MINGW-packages/**/PKGBUILD') }}
- name: Upload natron_package_repo artifacts
uses: actions/upload-artifact@v4.3.1
with:
name: natron_package_repo-${{ steps.build-package-repo.outputs.REPO_VERSION }}
path: natron_repo
- name: Check on failures
if: steps.build-package-repo.outcome != 'success'
run: exit 1