-
Notifications
You must be signed in to change notification settings - Fork 24
98 lines (79 loc) · 4.79 KB
/
compiling.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
name: Compiling ...
on:
pull_request:
branches:
- "**"
tags-ignore:
- "**"
push:
branches:
- "**"
tags-ignore:
- "**"
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies.
run: sudo apt-get update && sudo apt-get -qy install clang libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
- name: Compile!
run: make && make --always-make linux
- uses: actions/upload-artifact@v2
with:
name: basque.linux.zip
path: basque.linux.zip
mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies.
run: brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf
- name: Compile!
run: make && make --always-make mac
- uses: actions/upload-artifact@v2
with:
name: basque.mac.zip
path: basque.mac.zip
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: nuget/setup-nuget@v1
- name: Install dependencies.
run: nuget install sdl2.nuget -NonInteractive -ExcludeVersion -OutputDirectory C:\INCLUDE\; nuget install sdl2_image.nuget -NonInteractive -ExcludeVersion -OutputDirectory C:\INCLUDE\; nuget install sdl2_mixer.nuget -NonInteractive -ExcludeVersion -OutputDirectory C:\INCLUDE\; nuget install sdl2_ttf.nuget -NonInteractive -ExcludeVersion -OutputDirectory C:\INCLUDE\
- name: Clean up paths to match other platforms.
run: mkdir C:\INCLUDE\SDL2\; robocopy C:\INCLUDE\sdl2.nuget\build\native\include\ C:\INCLUDE\SDL2\; robocopy C:\INCLUDE\sdl2_image.nuget\build\native\include\ C:\INCLUDE\SDL2\; robocopy C:\INCLUDE\sdl2_mixer.nuget\build\native\include\ C:\INCLUDE\SDL2\; robocopy C:\INCLUDE\sdl2_ttf.nuget\build\native\include\ C:\INCLUDE\SDL2\; robocopy C:\INCLUDE\sdl2.nuget\build\native\lib\x64\ C:\INCLUDE\SDL2\; robocopy C:\INCLUDE\sdl2_image.nuget\build\native\lib\x64\ C:\INCLUDE\SDL2\; robocopy C:\INCLUDE\sdl2_mixer.nuget\build\native\lib\x64\ C:\INCLUDE\SDL2\; robocopy C:\INCLUDE\sdl2_ttf.nuget\build\native\lib\x64\ C:\INCLUDE\SDL2\; robocopy C:\INCLUDE\sdl2.nuget.redist\build\native\bin\x64\ C:\INCLUDE\SDL2\; robocopy C:\INCLUDE\sdl2_image.nuget.redist\build\native\bin\x64\ C:\INCLUDE\SDL2\; robocopy C:\INCLUDE\sdl2_mixer.nuget.redist\build\native\bin\x64\ C:\INCLUDE\SDL2\; robocopy C:\INCLUDE\sdl2_ttf.nuget.redist\build\native\bin\x64\ C:\INCLUDE\SDL2\; if ($LASTEXITCODE -le 7) { exit 0 } else { exit 1 }
- name: Install VS build tools and LLVM/clang.
run: choco install visualcpp-build-tools -y; choco install llvm -y
- name: Prepare VS enviro and compile!
run: $VS_EDITION = dir 'C:\Program Files\Microsoft Visual Studio\' | ? -FilterScript {$_.Name -like "[0-9]*"} | Sort CreationTime | Select Name -First 1; $VCVARSALL_BIN = Get-ChildItem -Path "C:\Program Files\Microsoft Visual Studio\$($VS_EDITION.Name)\" -Filter 'vcvarsall.bat' -Recurse | Select FullName -First 1; $Env:CC = "`"C:\Program Files\LLVM\bin\clang.exe`""; cmd /c "`"$($VCVARSALL_BIN.FullName)`" x64 && nmake /e && nmake /a windows"
- uses: actions/upload-artifact@v2
with:
name: basque.windows.zip
path: basque.windows.zip
wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# with:
# persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
# fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Install dependencies.
run: git clone https://github.com/emscripten-core/emsdk.git && cd emsdk && ./emsdk install latest && ./emsdk activate latest && cd ..
- name: Compile!
run: source "${HOME}/work/basque/basque/emsdk/emsdk_env.sh" && make --always-make wasm
- name: Commit our fresh new wasm.
run: |
git config --local user.email "[email protected]"
git config --local user.name "ActionBot"
git commit -m "Beep boop. Wasm encabulator updated." -a || exit 0
- name: Give often, give wasm.
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- uses: actions/upload-artifact@v2
with:
name: basque.wasm.zip
path: basque.wasm.zip