mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 12:04:38 -04:00
add MSYS2 build to CI (#622)
* add MSYS2 build to CI * attempt to fix install * misunderstood msystem * try with base-devel * bring back gcc * set cmake generator * try ninja * add release.yml * upload all *.zip * fix syntax * working release.yml * add CHANGELOG.md * update main.yml, delete travis.sh * get version from tag * remove msys2 32-bit build from main.yml
This commit is contained in:
parent
ba6d348c55
commit
cbff23fed4
62
.github/workflows/main.yml
vendored
62
.github/workflows/main.yml
vendored
@ -7,7 +7,7 @@ on:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
@ -20,10 +20,18 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Make
|
||||
- name: Configure
|
||||
env:
|
||||
CC: ${{ matrix.compiler }}
|
||||
run: $GITHUB_WORKSPACE/.travis.sh
|
||||
run: cmake -B build -G "Ninja"
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
cd build
|
||||
ninja -v package
|
||||
|
||||
cppcheck:
|
||||
runs-on: ubuntu-latest
|
||||
@ -35,23 +43,49 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Run cppcheck
|
||||
env:
|
||||
ANALYZE: true
|
||||
run: $GITHUB_WORKSPACE/.travis.sh
|
||||
shell: bash
|
||||
run: |
|
||||
cppcheck --error-exitcode=1 -j2 -DRANGECHECK -D_WIN32 -Isrc src toolsrc 2> stderr.txt
|
||||
RET=$?
|
||||
if [ -s stderr.txt ]
|
||||
then
|
||||
cat stderr.txt
|
||||
fi
|
||||
exit $RET
|
||||
|
||||
crossbuild:
|
||||
runs-on: ubuntu-latest
|
||||
msys2:
|
||||
runs-on: windows-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install gcc-mingw-w64-x86-64 ninja-build
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: mingw64
|
||||
install: >-
|
||||
git
|
||||
mingw-w64-x86_64-gcc
|
||||
mingw-w64-x86_64-cmake
|
||||
mingw-w64-x86_64-ninja
|
||||
mingw-w64-x86_64-SDL2
|
||||
mingw-w64-x86_64-SDL2_mixer
|
||||
mingw-w64-x86_64-SDL2_net
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Cross build
|
||||
env:
|
||||
CROSSRULE: "-DCMAKE_TOOLCHAIN_FILE=../CrossToWin64.cmake"
|
||||
run: $GITHUB_WORKSPACE/.travis.sh
|
||||
- name: Configure
|
||||
run: cmake -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
cd build
|
||||
cpack -G ZIP
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
|
70
.github/workflows/release.yml
vendored
Normal file
70
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
create_release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF##*_}
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: Woof! ${{ steps.get_version.outputs.VERSION }}
|
||||
|
||||
build_release:
|
||||
name: Build Release
|
||||
runs-on: windows-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { sys: mingw64, env: x86_64 }
|
||||
- { sys: mingw32, env: i686 }
|
||||
|
||||
steps:
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.sys }}
|
||||
install: >-
|
||||
git
|
||||
mingw-w64-${{matrix.env}}-gcc
|
||||
mingw-w64-${{matrix.env}}-cmake
|
||||
mingw-w64-${{matrix.env}}-ninja
|
||||
mingw-w64-${{matrix.env}}-SDL2
|
||||
mingw-w64-${{matrix.env}}-SDL2_mixer
|
||||
mingw-w64-${{matrix.env}}-SDL2_net
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Configure
|
||||
run: cmake -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
cd build
|
||||
cpack -G ZIP
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ needs.create_release.outputs.tag-name }}
|
||||
body_path: CHANGELOG.md
|
||||
files: build/*.zip
|
24
.travis.sh
24
.travis.sh
@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
if [ "$ANALYZE" = "true" ]
|
||||
then
|
||||
cppcheck --error-exitcode=1 -j2 -DRANGECHECK -D_WIN32 -Isrc src toolsrc 2> stderr.txt
|
||||
RET=$?
|
||||
if [ -s stderr.txt ]
|
||||
then
|
||||
cat stderr.txt
|
||||
fi
|
||||
exit $RET
|
||||
else
|
||||
set -e
|
||||
export VERBOSE=1
|
||||
rm -rf build/ CMakeCache.txt CMakeFiles/
|
||||
mkdir build && cd build
|
||||
if [ -n "$RELEASE" ]
|
||||
then
|
||||
BUILD_TYPE="-DCMAKE_BUILD_TYPE=Release"
|
||||
fi
|
||||
cmake -G "Ninja" "$BUILD_TYPE" "$CROSSRULE" .. -DENABLE_WERROR=ON
|
||||
ninja -v
|
||||
DESTDIR=/tmp/whatever ninja -v install/strip
|
||||
ninja -v package
|
||||
fi
|
9
CHANGELOG.md
Normal file
9
CHANGELOG.md
Normal file
@ -0,0 +1,9 @@
|
||||
**New Features and Improvements**
|
||||
* Two-colored HUD widgets (as in Crispy Doom).
|
||||
|
||||
**Bug Fixes**
|
||||
* Fix complevel vanilla scrollers.
|
||||
* Fix reload level during intermission.
|
||||
* Check if the lump can be a Doom patch in `R_GenerateLookup()`.
|
||||
* Fix `gcc-12 -O3` compiler warnings.
|
||||
* Only create autoload subdirectory relative to `D_DoomPrefDir()`.
|
Loading…
x
Reference in New Issue
Block a user