-
Notifications
You must be signed in to change notification settings - Fork 1.3k
154 lines (140 loc) · 4.82 KB
/
main.yml
File metadata and controls
154 lines (140 loc) · 4.82 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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: main
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
pull_request:
jobs:
build:
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master'}}
strategy:
fail-fast: false
matrix:
include: [
{ msystem: UCRT64, runner: windows-2022},
{ msystem: CLANG64, runner: windows-2022},
{ msystem: MINGW64, runner: windows-2022},
{ msystem: MINGW32, runner: windows-2022},
{ msystem: CLANGARM64, runner: windows-11-arm}
]
name: ${{ matrix.msystem }}
runs-on: ${{ matrix.runner }}
steps:
- name: Gather Facts
id: facts
run : |
Get-PSDrive -PSProvider FileSystem | Format-Table -AutoSize -Wrap
Get-CIMInstance -Class Win32_Processor | Select-Object -Property Name
Get-CIMInstance Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum | Format-Table @{n="TotalPhysicalMemory";e={$_.Sum}}
$BUILD_DRIVE = Split-Path $env:GITHUB_WORKSPACE -Qualifier
echo "drive=$BUILD_DRIVE" >> $env:GITHUB_OUTPUT
- name: Configure Pagefile
if: ${{ matrix.msystem != 'CLANGARM64' }}
# https://github.com/al-cheb/configure-pagefile-action/issues/16
continue-on-error: true
uses: al-cheb/configure-pagefile-action@v1.4
with:
minimum-size: 4GB
maximum-size: 16GB
# Needs to be C:, see https://github.com/al-cheb/configure-pagefile-action/issues/18
disk-root: "C:"
- uses: actions/checkout@v6
with:
path: temp
fetch-depth: 0
filter: blob:none
persist-credentials: false
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
install: git python base-devel
update: true
location: '${{ steps.facts.outputs.drive }}\M'
- name: Add staging repo
shell: msys2 {0}
run: |
cp /etc/pacman.conf /etc/pacman.conf.bak
grep -qFx '[staging]' /etc/pacman.conf || sed -i '/^# \[staging\]/,/^$/ s|^# ||g' /etc/pacman.conf
- name: Update using staging
run: |
msys2 -c 'pacman --noconfirm -Suuy'
msys2 -c 'pacman --noconfirm -Suu'
- name: Move Checkout
run: |
$path = "${{ steps.facts.outputs.drive }}\_"
If (Test-Path "$path") { rm -r -fo "$path" }
Move-Item -Path ".\temp" -Destination "$path"
- name: CI-Build
shell: msys2 {0}
id: build
run: |
cd "$(cygpath '${{ steps.facts.outputs.drive }}/_')"
MINGW_ARCH=${{ matrix.msystem }} ./.ci/ci-build.sh
- name: "Upload binaries"
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v6
with:
name: ${{ matrix.msystem }}-packages
path: ${{ steps.facts.outputs.drive }}/_/artifacts/*.pkg.tar.*
if-no-files-found: ignore
check:
needs: [build]
runs-on: windows-2022
steps:
- uses: actions/checkout@v6
- uses: actions/download-artifact@v7
continue-on-error: true
with:
name: UCRT64-packages
path: ${{ runner.temp }}/artifacts
- name: Check whether to Run
id: check-run
run: |
python .ci/ci-check.py --whether-to-run "${{ runner.temp }}/artifacts"
- uses: msys2/setup-msys2@v2
if: steps.check-run.outputs.run == 'true'
with:
msystem: UCRT64
update: true
install: mingw-w64-ucrt-x86_64-python-pip mingw-w64-ucrt-x86_64-python-pacdb
- name: Add staging repo
if: steps.check-run.outputs.run == 'true'
shell: msys2 {0}
run: |
sed -i '1s|^|[staging]\nServer = https://repo.msys2.org/staging/\nSigLevel = Never\n|' /etc/pacman.conf
- name: Update using staging
if: steps.check-run.outputs.run == 'true'
run: |
msys2 -c 'pacman --noconfirm -Suuy'
msys2 -c 'pacman --noconfirm -Suu'
- name: Run Checks
if: steps.check-run.outputs.run == 'true'
shell: msys2 {0}
run: |
python .ci/ci-check.py "${{ runner.temp }}/artifacts"
package-grokker:
runs-on: ubuntu-latest
needs: build
name: package-grokker-${{ matrix.msystem }}
strategy:
fail-fast: false
matrix:
include:
- msystem: UCRT64
repo: ucrt64
- msystem: CLANG64
repo: clang64
steps:
- uses: actions/download-artifact@v7
id: artifacts
continue-on-error: true
with:
name: ${{ matrix.msystem }}-packages
path: artifacts
- name: Grok packages
uses: msys2/package-grokker/grok-artifacts@main
if: steps.artifacts.outcome == 'success'
with:
repo: ${{ matrix.repo }}
path: artifacts