Add MSYS2 CI
All checks were successful
Build and Deploy / build-linux (push) Successful in 36s
Build and Deploy / build-windows (CLANG64) (push) Successful in 6m12s
Build and Deploy / package-dist (push) Has been skipped
Build and Deploy / deploy-itch (push) Has been skipped
Build and Deploy / deploy-gitea (push) Has been skipped
All checks were successful
Build and Deploy / build-linux (push) Successful in 36s
Build and Deploy / build-windows (CLANG64) (push) Successful in 6m12s
Build and Deploy / package-dist (push) Has been skipped
Build and Deploy / deploy-itch (push) Has been skipped
Build and Deploy / deploy-gitea (push) Has been skipped
This commit is contained in:
92
.github/workflows/build.yml
vendored
92
.github/workflows/build.yml
vendored
@@ -14,18 +14,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Check Out Code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Gitea credentials
|
||||
run: |
|
||||
git config --global credential.helper store
|
||||
echo "https://$GITEA_USER:$GITEA_TOKEN@gitea.pockle.world" >> ~/.git-credentials
|
||||
env:
|
||||
GITEA_USER: ${{ secrets.USER_GITEA }}
|
||||
GITEA_TOKEN: ${{ secrets.TOKEN_GITEA }}
|
||||
|
||||
- name: Cache SDL3 (Linux)
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
@@ -86,64 +78,41 @@ jobs:
|
||||
path: _pack
|
||||
|
||||
build-windows:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: gitea.pockle.world/john/prosperon/linux:latest
|
||||
runs-on: win-native
|
||||
strategy:
|
||||
matrix:
|
||||
msystem: [CLANG64]
|
||||
|
||||
steps:
|
||||
- name: Check Out Code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
msystem: ${{ matrix.msystem }}
|
||||
update: true
|
||||
install: |
|
||||
git
|
||||
zip
|
||||
gzip
|
||||
tar
|
||||
base-devel
|
||||
pacboy: |
|
||||
meson
|
||||
cmake
|
||||
sdl3
|
||||
toolchain
|
||||
|
||||
- name: Set up Gitea credentials
|
||||
- name: Build Prosperon
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
git config --global credential.helper store
|
||||
echo "https://$GITEA_USER:$GITEA_TOKEN@gitea.pockle.world" >> ~/.git-credentials
|
||||
env:
|
||||
GITEA_USER: ${{ secrets.USER_GITEA }}
|
||||
GITEA_TOKEN: ${{ secrets.TOKEN_GITEA }}
|
||||
|
||||
- name: Cache SDL3 (Windows cross)
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
sdl3-win
|
||||
sdl3-build-win
|
||||
key: sdl3-win-${{ hashFiles('sdl3-win/CMakeLists.txt') }}-v2
|
||||
|
||||
- name: Build SDL3 (Windows cross)
|
||||
run: |
|
||||
if [ ! -d "sdl3-win/.git" ]; then
|
||||
echo "Cloning SDL3 for Windows cross..."
|
||||
git clone --depth 1 --branch main https://github.com/libsdl-org/SDL.git sdl3-win
|
||||
else
|
||||
echo "SDL3-win source already present (possibly from cache)."
|
||||
fi
|
||||
mkdir -p sdl3-build-win
|
||||
cd sdl3-build-win
|
||||
cmake ../sdl3-win -GNinja \
|
||||
-DCMAKE_SYSTEM_NAME=Windows \
|
||||
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
|
||||
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
|
||||
-DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX="${PWD}/installed_sdl3_win" \
|
||||
-DSDL_SHARED=ON \
|
||||
-DSDL_STATIC=OFF
|
||||
ninja
|
||||
ninja install
|
||||
|
||||
- name: Configure PKG_CONFIG_PATH (Windows cross)
|
||||
run: |
|
||||
echo "PKG_CONFIG_PATH=${GITHUB_WORKSPACE}/sdl3-build-win/installed_sdl3_win/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Prosperon (Windows cross)
|
||||
run: |
|
||||
meson setup build -Dbuildtype=release -Db_lto=true -Db_ndebug=true --cross-file mingw32.cross
|
||||
meson setup build -Dbuildtype=release -Db_lto=true -Db_ndebug=true -Dtracy:only_localhost=true -Dtracy:no_broadcast=true
|
||||
meson compile -C build
|
||||
|
||||
- name: Test Prosperon
|
||||
shell: msys2 {0}
|
||||
continue-on-error: true
|
||||
env:
|
||||
TRACY_NO_INVARIANT_CHECK: 1
|
||||
run: |
|
||||
@@ -158,12 +127,13 @@ jobs:
|
||||
|
||||
- name: Create package folder
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
mkdir _pack
|
||||
cp build/prosperon.exe _pack/
|
||||
cp sdl3-build-win/installed_sdl3_win/bin/SDL3.dll _pack/
|
||||
pacboy sdl3 | grep "SDL3.dll$" | awk '{print $2}' | xargs -I {} cp {} _pack/
|
||||
|
||||
- name: Upload Artifact (Windows cross)
|
||||
- name: Upload Artifact (Windows)
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -226,6 +196,7 @@ jobs:
|
||||
if: ${{ false }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# [Deploy-itch steps remain unchanged]
|
||||
- name: Check Out Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -256,6 +227,7 @@ jobs:
|
||||
needs: [package-dist]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# [Deploy-gitea steps remain unchanged]
|
||||
- name: Check Out Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user