-
Notifications
You must be signed in to change notification settings - Fork 1
91 lines (86 loc) · 2.58 KB
/
main.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
name: Raycaster CI
on: [push, pull_request]
jobs:
windows-build:
runs-on: windows-2022
steps:
- uses: ilammy/msvc-dev-cmd@v1
- name: Set compiler environment for Windows
uses: lukka/set-shell-env@v1
with:
CXX: cl.exe
CC: cl.exe
VS160COMNTOOLS: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools
- name: Checkout
uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: Build project
uses: lukka/run-cmake@v3
with:
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=Release"
buildDirectory: "${{ github.workspace }}/build/"
- name: Generate ZIP package
working-directory: build
run: |
cpack -C "Release"
- name: Publish release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
build/Raycaster-*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
linux-build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
# https://github.com/AppImage/AppImageKit/wiki/FUSE
- name: Install FUSE
run: |
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install libfuse2
- uses: lukka/get-cmake@latest
- name: Build project
run: |
cmake -DCMAKE_BUILD_TYPE=Release
make -j`nproc`
- name: Generate AppImage package
run: |
make install DESTDIR=.
- name: Publish release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
Raycaster-*.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
web-build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libsdl2-dev
- name: Setup Emscripten
uses: mymindstorm/setup-emsdk@v11
- name: Build project
run: |
emcmake cmake \
-DWEBBUILD_CI=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=dist \
.
emmake make VERBOSE=1
emmake make install VERBOSE=1
- name: Publish release
if: startsWith(github.ref, 'refs/tags/')
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist