forked from jimon/premake-ninja
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unified GitHub Action unit test workflow
- Loading branch information
Showing
4 changed files
with
98 additions
and
160 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file was deleted.
Oops, something went wrong.