@@ -38,35 +38,49 @@ jobs:
3838 - name : Windows Tiles x64
3939 mxe : x86_64
4040 artifact : windows-tiles-x64
41- os : windows
41+ os : ubuntu-latest
4242 ext : zip
4343 content : application/zip
4444 - name : Windows Tiles x32
4545 mxe : i686
4646 artifact : windows-tiles-x32
47- os : windows
47+ os : ubuntu-latest
4848 ext : zip
4949 content : application/zip
5050 - name : Linux Tiles x64
51- os : linux
51+ os : ubuntu-latest
5252 mxe : none
5353 tiles : 1
5454 artifact : linux-tiles-x64
5555 ext : tar.gz
5656 content : application/gzip
5757 - name : linux-curses-x64
58- os : linux
58+ os : ubuntu-latest
5959 mxe : none
6060 tiles : 0
6161 artifact : linux-curses-x64
6262 ext : tar.gz
6363 content : application/gzip
64+ - name : osx-curses-x64
65+ os : macos-10.15
66+ mxe : none
67+ tiles : 0
68+ artifact : osx-curses-x64
69+ ext : dmg
70+ content : application/x-apple-diskimage
71+ - name : osx-tiles-x64
72+ os : macos-10.15
73+ mxe : none
74+ tiles : 1
75+ artifact : osx-tiles-x64
76+ ext : dmg
77+ content : application/x-apple-diskimage
6478 name : ${{ matrix.name }}
65- runs-on : ubuntu-latest
79+ runs-on : ${{ matrix.os }}
6680 steps :
6781 - uses : actions/checkout@v2
6882 - name : Install dependencies (windows)
69- if : matrix.os == 'windows '
83+ if : matrix.mxe != 'none '
7084 run : |
7185 sudo apt install astyle autoconf automake autopoint bash bison bzip2 cmake flex gettext git g++ gperf intltool \
7286 libffi-dev libgdk-pixbuf2.0-dev libtool libltdl-dev libssl-dev libxml-parser-perl lzip make mingw-w64 openssl \
@@ -80,13 +94,18 @@ jobs:
8094 sudo apt update
8195 sudo apt install mxe-{i686,x86-64}-w64-mingw32.static-{sdl2,sdl2-ttf,sdl2-image,sdl2-mixer,gettext}
8296 - name : Install dependencies (Linux)
83- if : matrix .os == 'linux '
97+ if : runner .os == 'Linux' && matrix.mxe == 'none '
8498 run : |
8599 sudo apt-get update
86100 sudo apt-get install libncursesw5-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev \
87101 libsdl2-mixer-dev libpulse-dev ccache gettext parallel
102+ - name : Install dependencies (mac)
103+ if : runner.os == 'macOS'
104+ run : |
105+ HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ccache parallel
106+ pip3 install dmgbuild biplist
88107 - name : Build CDDA (linux)
89- if : matrix .os == 'linux '
108+ if : runner .os == 'Linux' && matrix.mxe == 'none '
90109 run : |
91110 cat >VERSION.txt <<EOL
92111 build type: ${{ matrix.artifact }}
97116 make -j$((`nproc`+0)) TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 bindist
98117 mv cataclysmdda-0.E.tar.gz cdda-${{ matrix.artifact }}-b${{ github.run_number }}.tar.gz
99118 - name : Build CDDA (windows)
100- if : matrix.os == 'windows '
119+ if : matrix.mxe != 'none '
101120 env :
102121 PLATFORM : /usr/lib/mxe/usr/bin/${{ matrix.mxe }}-w64-mingw32.static-
103122 run : |
@@ -109,6 +128,17 @@ jobs:
109128 EOL
110129 make -j$((`nproc`+0)) CROSS="${PLATFORM}" TILES=1 SOUND=1 RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 bindist
111130 mv cataclysmdda-0.E.zip cdda-${{ matrix.artifact }}-b${{ github.run_number }}.zip
131+ - name : Build CDDA (osx)
132+ if : runner.os == 'macOS'
133+ run : |
134+ cat >VERSION.txt <<EOL
135+ build type: ${{ matrix.artifact }}
136+ build number: ${{ github.run_number }}
137+ commit sha: ${{ github.sha }}
138+ commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
139+ EOL
140+ make -j3 TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 dmgdist
141+ mv Cataclysm.dmg cdda-${{ matrix.artifact }}-b${{ github.run_number }}.dmg
112142 - name : Upload release asset
113143 id : upload-release-asset
114144 uses : actions/upload-release-asset@v1
0 commit comments