Skip to content

Fix

Fix #9

Workflow file for this run

name: MinGW
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install base environment
run: >
sudo apt install --no-install-recommends --yes
wget ca-certificates python3-pip ninja-build
g++-mingw-w64-x86-64 mingw-w64-tools
- name: Install meson
run: pip3 install meson
- name: Install SDL2-MinGW
run: |
mkdir -p /tmp/sdl
wget -qO- https://github.com/libsdl-org/SDL/releases/download/release-2.28.5/SDL2-devel-2.28.5-mingw.tar.gz | tar -xz --strip-components 1 -C /tmp/sdl
sudo make CROSS_PATH=/usr -C /tmp/sdl cross
mkdir -p /tmp/sdl_image
wget -qO- https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.2/SDL2_image-devel-2.8.2-mingw.tar.gz | tar -xz --strip-components 1 -C /tmp/sdl_image
sudo make CROSS_PATH=/usr -C /tmp/sdl_image cross
- name: Check out source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get version
id: version
run: echo "VERSION=$(git describe --tags --long --always | sed 's/^v//;s/-/./')" >> $GITHUB_OUTPUT
- name: Build
id: build
run: |
echo "BUILD_PATH=.build" >> $GITHUB_ENV
meson -Dversion=${{ steps.version.outputs.VERSION }} --buildtype release --cross-file .github/workflows/mingw.txt ${{ env.BUILD_PATH }}
ninja -C ${{ env.BUILD_PATH }}
- name: Install
id: install
env:
INSTALL_PATH: ${{ env.BUILD_PATH }}/install/PipeWalker-${{ steps.version.outputs.VERSION }}
run: |
mkdir ${{ env.INSTALL_PATH }}
cp ${{ env.BUILD_PATH }}/pipewalker.exe \
cp /usr/lib/gcc/x86_64-w64-mingw32/10-win32/libgcc_s_seh-1.dll \
cp /usr/lib/gcc/x86_64-w64-mingw32/10-win32/libstdc++-6.dll \
cp /usr/x86_64-w64-mingw32/bin/SDL2.dll \
cp /usr/x86_64-w64-mingw32/bin/SDL2_image.dll \
${{ env.INSTALL_PATH }}
x86_64-w64-mingw32-strip --strip-all ${{ env.INSTALL_PATH }}/*
cp -r data ${{ env.INSTALL_PATH }}
- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: pipewalker-${{ steps.version.outputs.VERSION }}-win64.zip
path: ${{ env.INSTALL_PATH }}