Skip to content

Commit

Permalink
MSYS2 builds (#638)
Browse files Browse the repository at this point in the history
* Set up msys2 build

* Remove env

* Try build step

* Try build step

* Do build step

* Build without update

* Replace directory name

* Package and deliver

* Zip the correct install directory

* Pick up dlls

* Specify dlls version numbers

* Add libopus

* Add libssp

* Remove  mingw-w64-i686-pkg-config dependency

* Add wizard/non-wizard builds

* More descriptive names for msys2 builds

* Restrict repository to attnam/ivan (enable later)

* Add tag name to file version string

* Try capture file name better

* Fix line 44 error

* Re-name file instead
  • Loading branch information
ryfactor authored Dec 23, 2021
1 parent 473297a commit 6267c82
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build-msys2-nonwizard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: MSYS2-nonwizard
on: [push]

jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
release: false
update: false
install: git mingw-w64-i686-gcc make mingw-w64-i686-cmake mingw-w64-i686-libpng mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_mixer
- name: CI-Build
run: |
cd D:/a/ivan/ivan
mkdir installation
mkdir build
cd build
cmake .. -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=D:/a/ivan/ivan/installation
make VERBOSE=1 -j4 install
- name: Package
run: Compress-Archive -Path "D:\a\ivan\ivan\installation\ivan\*" -DestinationPath ${{ github.workspace }}\IvanWin.zip
shell: pwsh
48 changes: 48 additions & 0 deletions .github/workflows/build-msys2-wizmode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: MSYS2-wizmode
on: [push]

jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
release: false
update: false
install: git mingw-w64-i686-gcc make mingw-w64-i686-cmake mingw-w64-i686-libpng mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_mixer
- name: Get tag name, print
shell: bash
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Build and install
run: |
cd D:/a/ivan/ivan
mkdir installation
mkdir build
cd build
cmake .. -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=D:/a/ivan/ivan/installation -DWIZARD=ON
make VERBOSE=1 -j4 install
- name: Package
run: |
$FILE_VERSION = "IVAN-${{env.RELEASE_VERSION}}-win"
Compress-Archive -Path "D:\a\ivan\ivan\installation\ivan\*" -DestinationPath ${{ github.workspace }}\IvanWin.zip
Rename-Item -Path "${{ github.workspace }}\IvanWin.zip" -NewName "$FILE_VERSION.zip"
shell: pwsh

# Attention: you perform the release step when you push a tag, neat huh?
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ github.workspace }}\*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#GITHUB_REPOSITORY: attnam/ivan

0 comments on commit 6267c82

Please sign in to comment.