-
Notifications
You must be signed in to change notification settings - Fork 40
105 lines (89 loc) · 2.5 KB
/
PKGBUILD.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: PKGBUILD
on:
workflow_call:
inputs:
name:
description: 'Name of the package/tool, to be appended to artifact names.'
required: true
type: string
matrix:
description: 'JSON list of systems to build and test the tool on.'
required: true
type: string
path:
description: 'Location of the PKGBUILD recipe, relative to the root of the repository.'
required: true
type: string
test:
description: 'Commands to test the tool after installing the package.'
required: true
type: string
jobs:
win-makepkg:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(inputs.matrix) }}
name: 🚧${{ matrix.icon }} ${{ matrix.sys }} | makepkg
defaults:
run:
shell: msys2 {0}
env:
MINGW_ARCH: ${{ matrix.sys }}
steps:
- name: '⚙️ git config'
run: git config --global core.autocrlf input
shell: bash
- name: '🧰 Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: '${{ matrix.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: git base-devel tree
pacboy: toolchain:p
- name: '🚧 Build package'
run: |
cd ${{ inputs.path }}
makepkg-mingw --noconfirm --noprogressbar -sCLf
- name: '📤 Upload artifact: package'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.sys }}-${{ inputs.name }}
path: ${{ inputs.path }}/*.zst
- name: '🔍 Show package content'
run: |
mkdir tmp
cd tmp
tar -xf ../${{ inputs.path }}/*.zst
tree .
win-test:
needs: win-makepkg
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(inputs.matrix) }}
name: 🚦${{ matrix.icon }} ${{ matrix.sys }} | test
defaults:
run:
shell: msys2 {0}
steps:
- name: '${{ matrix.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
- name: '📥 Download artifact: package'
uses: actions/download-artifact@v4
with:
path: .
name: ${{ matrix.sys }}-${{ inputs.name }}
- name: '🛠️ Install package'
run: pacman -U --noconfirm --noprogressbar *.zst
- name: '🚦 Test package'
run: ${{ inputs.test }}