-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (84 loc) · 2.13 KB
/
nerfhack-cross-platform-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: NerfHack
on:
push:
branches: [ master, dev ]
tags:
- '**'
pull_request:
branches: [ master, dev ]
jobs:
linux-build:
runs-on: ubuntu-latest
env:
#LUA_VERSION: 5.4.2
#HINTS_FILE: linux.370
HINTS_FILE: linux-debug
steps:
- uses: actions/checkout@v4
- name: setup
run: ./sys/unix/setup.sh sys/unix/hints/$HINTS_FILE
- name: fetch lua
run: |
make fetch-lua
- name: make all
run: make all
- name: make install
run: make install
mac-build:
runs-on: macos-latest
env:
HINTS_FILE: macOS.370
steps:
- uses: actions/checkout@v4
- name: setup
run: |
./sys/unix/setup.sh sys/unix/hints/$HINTS_FILE
make fetch-lua
- name: make all
run: make all
- name: make install
run: make install
windows-build:
permissions: write-all
runs-on: windows-latest
env:
ADD_LUA: Y
WANT_LUAC: N
LUATOP: ../submodules/lua
LUASRC: ../submodules/lua
ADD_CURSES: Y
PDCURSES_TOP: ../submodules/pdcurses
LUA_VERSION: 5.4.6
TRAVIS_COMPILER: 1
ZIP_NAME: NerfHack_2.0.0.zip
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ilammy/msvc-dev-cmd@v1 # enable visual c compiler / nmake
- name: setup
run: |
./sys/windows/nhsetup.bat
- name: make install
run: |
cd src
nmake fetch-lua
nmake package
# Note: mingw build doesn't seem to build NerfHackW.exe and is disabled.
# This would work to build the tty windows version, though.
#cp ../sys/winnt/Makefile.gcc ./Makefile
#mingw32-make LUA_VERSION=$LUA_VERSION install
- uses: thedoctor0/zip-release@master
if: startsWith(github.ref, 'refs/tags/')
with:
type: 'zip'
path: binary/
filename: NerfHack_2.0.0.zip
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
NerfHack_2.0.0.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}