Skip to content

test release artifact generation #1

test release artifact generation

test release artifact generation #1

name: build - windows (mingw)
on:
workflow_call:
jobs:
windows:
strategy:
fail-fast: false
matrix:
config: [Debug, Release]
arch: [x64, x86]
include:
- arch: x64
bits: 64
archname: x86_64
- arch: x86
bits: 32
archname: i686
name: Windows ${{ matrix.config }} ${{ matrix.arch }} Build (MinGW)
runs-on: windows-2022
env:ARTIFACT_NAME = "Widelands-${{ github.sha }}-mingw-${{ matrix.config }}-${{ matrix.arch }}"

Check failure on line 21 in .github/workflows/build_windows.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build_windows.yaml

Invalid workflow file

You have an error in your yaml syntax on line 21
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Installing dependencies
run: |
$env:Path = "C:\msys64\usr\bin;$env:Path"
pacman.exe --noconfirm -Syyuu --ignore ca-certificates
pacman.exe --noconfirm -Syyuu --ignore ca-certificates
bash.exe -c "./install-dependencies.sh msys${{ matrix.bits }} --noconfirm --disable-download-timeout"
choco install innosetup
- name: Compiler
run: |
$env:Path = "C:/msys64/mingw${{ matrix.bits }}/include;C:/msys64/mingw${{ matrix.bits }}/lib;C:/msys64/mingw${{ matrix.bits }}/bin;C:/msys64/usr/bin;$env:Path"
$env:CC = "C:/msys64/mingw${{ matrix.bits }}/bin/gcc.exe"
$env:CXX = "C:/msys64/mingw${{ matrix.bits }}/bin/g++.exe"
mkdir $env:GITHUB_WORKSPACE\build
cd $env:GITHUB_WORKSPACE\build
cmake.exe -G Ninja .. -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DOPTION_BUILD_WEBSITE_TOOLS=OFF -DOPTION_BUILD_TESTS=ON -DOPTION_ASAN=OFF -DUSE_XDG=OFF -DOPTION_BUILD_CODECHECK=OFF -DUSE_FLTO_IF_AVAILABLE=OFF -DCMAKE_JOB_POOLS="linking=1" -DCMAKE_JOB_POOL_LINK=linking -DOPTION_BUILD_WINSTATIC=ON -DOPTION_FORCE_EMBEDDED_MINIZIP=ON
if ((Select-String -Quiet REVDETECT-BROKEN VERSION)) { exit 1 }
cmake.exe --build .
if ("${{ matrix.config }}" -Match "Release") {
strip -sv ./src/widelands.exe
}
# C:\"Program Files"\7-Zip\7z.exe a -tzip ../../Widelands-${{ github.sha }}-mingw-${{ matrix.config }}-${{ matrix.arch }}.zip widelands.exe
C:\"Program Files"\7-Zip\7z.exe a -tzip ../../${ARTIFACT_NAME}.zip widelands.exe
- name: Uploading executable
uses: actions/upload-artifact@v4
with:
name: Widelands ${{ matrix.config }} ${{ matrix.arch }} Binary Only (MinGW)
path: ${{ github.workspace }}\${ARTIFACT_NAME}.zip
- name: InnoSetup
run: |
cd $env:GITHUB_WORKSPACE
# Environment variables needed by our InnoSetup script
$env:PLATFORM = "${{ matrix.arch }}"
$env:MINGWPATH = "C:\msys64\mingw${{ matrix.bits }}\bin"
$env:CONFIGURATION = "${{ matrix.config }}"
$env:APPVEYOR_BUILD_FOLDER = $env:GITHUB_WORKSPACE
$env:APPVEYOR_BUILD_VERSION = "Widelands-${{ github.sha }}-${{ matrix.config }}-${{ matrix.arch }}"
ISCC.exe /o$env:GITHUB_WORKSPACE /fWidelands-${{ github.sha }}-mingw-${{ matrix.config }}-${{ matrix.arch }} $env:GITHUB_WORKSPACE\utils\windows\innosetup\Widelands.iss
- name: Uploading installer
uses: actions/upload-artifact@v4
with:
name: Widelands ${{ matrix.config }} ${{ matrix.arch }} Installer (MinGW)
path: ${{ github.workspace }}\Widelands-${{ github.sha }}-mingw-${{ matrix.config }}-${{ matrix.arch }}.exe