-
Notifications
You must be signed in to change notification settings - Fork 1
144 lines (113 loc) · 3.38 KB
/
ci.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: CI
env:
CI: true
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
Windows:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- name: Install MSYS2
uses: msys2/setup-msys2@v1
with:
update: true
path-type: inherit
cache: true
install: "autoconf git make mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-pkg-config mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-SDL2_ttf"
- name: Download Gambit Scheme
uses: daviwil/download-gambit@v1
with:
os: win-mingw
repo: daviwil/gambit
branch: build-gambit-patched
workflow-name: Build Gambit
artifact-token: ${{ secrets.ARTIFACT_TOKEN }}
- name: Run Tests
run: ./test.sh
- name: Build Code
run: ./build.sh
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: crash-the-stack-win-x64
path: dist/
Linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install SDL2
run: |
sudo apt-get update
sudo apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev
- name: Download Gambit Scheme
uses: daviwil/download-gambit@v1
with:
repo: daviwil/gambit
branch: build-gambit-patched
workflow-name: Build Gambit
artifact-token: ${{ secrets.ARTIFACT_TOKEN }}
- name: Run Tests
run: ./test.sh
- name: Build Code
run: ./build.sh
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: crash-the-stack-linux-x64
path: dist/
macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install SDL2
run: brew install pkg-config sdl2 sdl2_image sdl2_ttf
- name: Download Gambit Scheme
uses: daviwil/download-gambit@v1
with:
repo: daviwil/gambit
branch: build-gambit-patched
workflow-name: Build Gambit
artifact-token: ${{ secrets.ARTIFACT_TOKEN }}
- name: Run Tests
run: ./test.sh
- name: Build Code
run: |
./scripts/macos/create-app.sh
./build.sh
mkdir dist/app
mv dist/crash-the-stack.app dist/app
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: crash-the-stack-macos-x64
path: dist/app
Itch-Upload:
runs-on: ubuntu-latest
needs: [Windows, Linux, macOS]
if: success() && github.event_name == 'push'
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
- name: Download Butler
run: |
wget -O butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
unzip butler.zip
chmod +x butler
./butler -V
- name: Upload Artifacts to Itch.io
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: |
# Upload Windows build
./butler push ./crash-the-stack-win-x64 fluxharmonic/crash-the-stack:windows-dev
# Upload Linux build
./butler push ./crash-the-stack-linux-x64 fluxharmonic/crash-the-stack:linux-dev
# Upload macOS build
./butler push ./crash-the-stack-macos-x64 fluxharmonic/crash-the-stack:macos-dev