-
Notifications
You must be signed in to change notification settings - Fork 2
99 lines (99 loc) · 4.13 KB
/
Copy pathprepare-podman-release.yml
File metadata and controls
99 lines (99 loc) · 4.13 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
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/podman-container-tools/podman.git
PODMAN_SHA: b28edb9ad70ce4317dc762ee9ce0a6d081d154e9 # v6.0.2
PODMAN_VERSION: 6.0.2
jobs:
build:
runs-on: windows-2025
outputs:
podman_version: ${{ steps.make_versions.outputs.podman }}
steps:
- name: "🏗️ Install msys2"
uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
with:
msystem: UCRT64
update: true
install: >-
make git unzip base-devel man-db zip mingw-w64-ucrt-x86_64-go python
- name: "🏗️ Install tools"
run: |
winget install --silent --accept-source-agreements --accept-package-agreements --disable-interactivity SoftwareFreedomConservancy.QEMU
winget install --silent --accept-source-agreements --accept-package-agreements --disable-interactivity JohnMacFarlane.Pandoc
dotnet tool install wix --global --version 5.0.2
- name: "📝 Configure checkout"
run: git config --global core.autocrlf input
- name: "📝 Checkout"
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 1
- name: "🔗 Link tools"
shell: msys2 {0}
run: |
mkdir -p /usr/local/bin
ln -sf "$LOCALAPPDATA\\Programs\\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
patch --binary -l -p 1 < ../patches/podman/0002-Update-QEMU-CPU-baseline-to-x86-64-v3.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
GINKGOTIMEOUT: --timeout=90m
run: |
$env:PATH="$env:PROGRAMFILES\QEMU;$env:PATH"
./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 -Version $BUILD_PODMAN_VERSION -Architecture amd64 -LocalReleaseDirPath 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.msi" 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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: qcw-podman
path: qcw