Skip to content

wip msys2

wip msys2 #296

Workflow file for this run

name: "Build"
on:
push:
# Only run on branches
branches:
- '**'
jobs:
# linux:
# runs-on: ubuntu-20.04
# steps:
# - name: "Install dependencies"
# run: |
# sudo apt update -y
# sudo apt install -y libsdl2-dev libsdl2-image-dev
# - name: "Checkout sources"
# uses: actions/checkout@v3
# - name: "Compile"
# run: |
# make bin/brogue
# - name: "Create artifact"
# run: |
# make BrogueCE-linux
# tar -czvf BrogueCE-linux-x86_64.tar.gz BrogueCE-linux
# - name: "Upload artifact"
# uses: actions/upload-artifact@v4
# with:
# name: linux-x86_64
# path: BrogueCE-linux-x86_64.tar.gz
# compression-level: 0 # There's no point compressing something already compressed
# macos:
# runs-on: macos-13
# steps:
# - name: "Checkout sources"
# uses: actions/checkout@v3
# - name: "Prepare"
# run: |
# make macos/sdl2.rb
# - name: "Cache SDL2"
# uses: actions/cache@v3
# with:
# path: sdl2-cellar
# key: sdl2-${{hashFiles('macos/sdl2.rb')}}
# - name: "Compile and install dependencies"
# run: |
# if [ -d sdl2-cellar ]; then
# cp -r sdl2-cellar $(brew --cellar)/sdl2
# brew link sdl2
# else
# brew install --build-from-source ./macos/sdl2.rb
# cp -r $(brew --cellar)/sdl2 sdl2-cellar
# fi
# brew install sdl2_image dylibbundler
# - name: "Compile"
# run: |
# make MAC_APP=YES Brogue.app
# env:
# MACOSX_DEPLOYMENT_TARGET: "10.7"
# - name: "Fix and bundle dylib references"
# run: |
# cd Brogue.app/Contents && dylibbundler -cd -b -x MacOS/brogue
# - name: "Create artifact"
# run: |
# make BrogueCE-macos
# zip -rll BrogueCE-macos-x86_64.zip BrogueCE-macos
# - name: "Upload artifact"
# uses: actions/upload-artifact@v4
# with:
# name: macos-x86_64
# path: BrogueCE-macos-x86_64.zip
# compression-level: 0 # There's no point compressing something already compressed
windows:
runs-on: windows-latest
steps:
- name: "Checkout sources"
uses: actions/checkout@v3
- name: "Locate mt"
run: |
Set-Content -Path 'mt_path' -Value (Get-Command mt).Path
- name: "Install MSYS2 and packages"
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
release: false
install: "make diffutils mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image"
- name: "Compile"
shell: "msys2 {0}"
run: |
make SYSTEM=WINDOWS CC=gcc MT="$(cygpath -u < mt_path)" bin/brogue.exe
ldd bin/brogue.exe
- name: "Create artifact"
shell: "msys2 {0}"
run: |
make SYSTEM=WINDOWS BrogueCE-windows
- name: "Upload artifact"
uses: actions/upload-artifact@v4
with:
name: windows-x86_64
path: BrogueCE-windows-x86_64.zip
compression-level: 0 # There's no point compressing something already compressed