forked from jimon/premake-ninja
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (95 loc) · 2.78 KB
/
unittests.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: UnitTests
on:
workflow_dispatch:
push:
paths:
- '.github/workflows/unittests.yml'
- 'tests/**'
- '**/*.lua'
pull_request:
paths:
- '.github/workflows/unittests.yml'
- 'tests/**'
- '**/*.lua'
jobs:
ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout premake5
uses: actions/checkout@v3
with:
repository: premake/premake-core
path: .bins/premake-build
- name: Build premake5
run: |
cd .bins/premake-build
make -f Bootstrap.mak linux CONFIG=release
cp bin/release/premake5 ../
cd ..
rm -Rf premake-build
- name: Install latest ninja-build
run: |
sudo wget -qO /usr/local/bin/ninja.gz https://github.com/ninja-build/ninja/releases/latest/download/ninja-linux.zip
sudo gunzip /usr/local/bin/ninja.gz
sudo chmod a+x /usr/local/bin/ninja
- name: Versions
run: |
python --version
.bins/premake5 --version
ninja --version
- name: Run tests
run: cd tests && PATH=$PATH:`pwd`/../.bins python run_tests.py
windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout premake5
uses: actions/checkout@v3
with:
repository: premake/premake-core
path: .bins/premake-build
- name: Build premake5
run: |
$vcvarall_path = vswhere -find VC\Auxiliary\Build\vcvarsall.bat
cmd.exe /c "call ""$vcvarall_path"" x86_amd64 && cd .bins/premake-build && nmake -f Bootstrap.mak MSDEV=vs2022 windows-msbuild PLATFORM=Win32 CONFIG=release && cp bin/release/premake5.exe ../"
- name: Install ninja
uses: seanmiddleditch/gha-setup-ninja@v4
- name: Versions
run: |
python --version
.bins/premake5 --version
ninja --version
- name: Add cl.exe to PATH
uses: ilammy/msvc-dev-cmd@v1
- name: Run tests
run: cd tests && PATH=$PATH:`pwd`/../.bins python run_tests.py
shell: bash
macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout premake5
uses: actions/checkout@v3
with:
repository: premake/premake-core
path: .bins/premake-build
- name: Build premake5
run: |
cd .bins/premake-build
make -f Bootstrap.mak osx CONFIG=release
cp bin/release/premake5 ../
cd ..
rm -Rf premake-build
- name: Install ninja
uses: seanmiddleditch/gha-setup-ninja@v4
- name: Versions
run: |
python --version
.bins/premake5 --version
ninja --version
- name: Run tests
run: cd tests && PATH=$PATH:`pwd`/../.bins python run_tests.py