Skip to content

Prepare QCW Podman (from revision) #120

Prepare QCW Podman (from revision)

Prepare QCW Podman (from revision) #120

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: 3b6c7665b9eb755254a3164f9f89353414baec41 # 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
patch --binary -l -p 1 < ../patches/podman/0002-Update-QEMU-CPU-baseline-to-x86-64v2.5.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