Skip to content

Commit

Permalink
Unified GitHub Action unit test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
GamesTrap committed Jan 13, 2024
1 parent 46b482e commit f0cb685
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 160 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/macos.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/ubuntu.yml

This file was deleted.

98 changes: 98 additions & 0 deletions .github/workflows/unittests.yml
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
50 changes: 0 additions & 50 deletions .github/workflows/windows.yml

This file was deleted.

0 comments on commit f0cb685

Please sign in to comment.