-
Notifications
You must be signed in to change notification settings - Fork 1
123 lines (107 loc) · 3.87 KB
/
prepare-podman-release.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Prepare QCW Podman (from revision)
on:
workflow_dispatch:
workflow_call:
outputs:
podman_version:
description: Podman version"
value: ${{ jobs.build.outputs.podman_version }}
env:
PODMAN_GITURL: https://github.com/containers/podman.git
PODMAN_SHA: b60df61c3fbc6f331ba70b49b3088ba60e9c28a9 # v5.4.0-dev
PODMAN_VERSION: 5.4.0-dev
PODMAN_REVISION_KIND: dev # prod|dev
jobs:
build:
runs-on: windows-latest
outputs:
podman_version: ${{ steps.make_versions.outputs.podman }}
steps:
- name: "🏗️ Install msys2"
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
make
git
unzip
base-devel
man-db
mingw-w64-ucrt-x86_64-toolchain
zip
mingw-w64-ucrt-x86_64-go
mingw-w64-ucrt-x86_64-qemu
- name: "🏗️ Install Pandoc"
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install pandoc -y --force\
- name: "🏗️ Install WiX toolset"
run: dotnet tool install --global wix
- name: "📝 Configure checkout"
run: git config --global core.autocrlf input
- name: "📝 Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: "🔗 Link tools"
shell: msys2 {0}
run: |
mkdir -p /usr/local/bin
ln -sf "$PROGRAMFILES\\Pandoc\\pandoc.exe" "/usr/local/bin/pandoc.exe"
ln -sf "$USERPROFILE\\.dotnet\\tools\\wix.exe" "/usr/local/bin/wix.exe"
ln -sf "$USERPROFILE\\.dotnet\\tools\\.store" "/usr/local/bin/.store"
- name: "📝 Fetch sources"
shell: msys2 {0}
run: |
mkdir podman-release
cd podman-release
git init
git remote add origin $PODMAN_GITURL
git fetch --depth 1 origin $PODMAN_SHA
git checkout FETCH_HEAD
patch --binary -l -p 1 < ../patches/podman/0001-Implement-QEMU-Podman-machine-on-Windows.patch
- name: "⚗️ Prepare Test Podman"
working-directory: podman-release
shell: msys2 {0}
run: |
HELPER_BINARIES_DIR=`cygpath -w "$(pwd)/bin/windows"` make clean podman-remote win-gvproxy
- name: "🧪 Test Podman"
working-directory: podman-release
shell: pwsh
env:
CONTAINERS_MACHINE_PROVIDER: qemu
MACHINE_TEST_TIMEOUT: 360
run: |
$env:PATH="$env:PATH;D:\a\_temp\msys64\ucrt64\bin"
./winmake localmachine
- name: "🛠️ Build Podman"
working-directory: podman-release
shell: msys2 {0}
run: |
make clean podman-remote-release-windows_amd64.zip
export BUILD_PODMAN_VERSION=$(test/version/version | sed 's/-.*//')
mkdir -p contrib/win-installer/current
cp *.zip contrib/win-installer/current/
cd contrib/win-installer
powershell -ExecutionPolicy Bypass -File build.ps1 $BUILD_PODMAN_VERSION $PODMAN_REVISION_KIND current
- name: "📦 Pack Podman"
shell: msys2 {0}
run: |
mkdir -p qcw
export BUILD_PODMAN_VERSION=$(podman-release/test/version/version | sed 's/-.*//')
cp "podman-release/contrib/win-installer/podman-$BUILD_PODMAN_VERSION-"*"setup.exe" qcw/
cd qcw
find . -type f \( ! -iname "*.checksums" \) -exec sha256sum -b {} \; > sha.checksums
find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums
cat sha.checksums
- id: make_versions
name: "📌 Export versions"
shell: msys2 {0}
run: |
echo "podman=$PODMAN_VERSION" >> "$GITHUB_OUTPUT"
- name: "🚀 Upload artifact"
uses: actions/upload-artifact@v4
with:
name: qcw-podman
path: qcw