Added linux tests action #24
Workflow file for this run
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
name: build | |
on: | |
push: | |
pull_request: | |
workflow_run: | |
# Use a workflow as a trigger of scheduled builds. Forked repositories can disable scheduled builds by disabling | |
# "scheduled" workflow, while maintaining ability to perform local CI builds. | |
workflows: | |
- scheduled | |
branches: | |
- main | |
- test_actions | |
types: | |
- requested | |
jobs: | |
test-windows: | |
runs-on: windows-2022 | |
env: | |
VS_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise | |
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\ | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Update submodules | |
shell: cmd | |
run: | | |
git submodule update --init | |
- name: Cache dependencies | |
id: cache-deps | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-deps | |
with: | |
path: C:/libraries | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('tools/install_deps.py') }}-v1 | |
- if: ${{ steps.cache-deps.outputs.cache-hit != 'true' }} | |
name: Install dependencies | |
shell: cmd | |
run: | | |
pip install conan | |
python tools/install_deps.py C:/libraries | |
- name: Build libfwk debug | |
shell: cmd | |
run: '"%MSBUILD_PATH%\MSBuild.exe" windows\libfwk.vcxproj /p:Platform=x64 /p:Configuration=Debug' | |
- name: Build test_window | |
shell: cmd | |
run: '"%MSBUILD_PATH%\MSBuild.exe" windows\test_window.vcxproj /p:Platform=x64 /p:Configuration=Debug' | |
- name: Build test_stuff | |
shell: cmd | |
run: '"%MSBUILD_PATH%\MSBuild.exe" windows\test_stuff.vcxproj /p:Platform=x64 /p:Configuration=Debug' | |
- name: Build test_geom | |
shell: cmd | |
run: '"%MSBUILD_PATH%\MSBuild.exe" windows\test_geom.vcxproj /p:Platform=x64 /p:Configuration=Debug' | |
- name: Build test_math | |
shell: cmd | |
run: '"%MSBUILD_PATH%\MSBuild.exe" windows\test_math.vcxproj /p:Platform=x64 /p:Configuration=Debug' | |
- name: Test stuff | |
shell: cmd | |
run: '"build\test_stuff-x64-Debug\test_stuff.exe"' | |
- name: Test math | |
shell: cmd | |
run: '"build\test_math-x64-Debug\test_math.exe"' | |
test-linux: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: | | |
git submodule update --init | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo apt-get install libsdl2-dev libfreetype-dev libvorbis-dev libogg-dev libopenal-dev libdwarf-dev libelf-dev | |
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc | |
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list | |
sudo apt update | |
sudo apt install vulkan-sdk | |
- name: Build libfwk | |
run: | | |
make -j8 lib | |
- name: Build tests & tools | |
run: | | |
make -j8 tests tools | |
- name: Run tests | |
run: | | |
tests/stuff | |
tests/math | |
tests/geom | |
tests/hash_map_perf | |
tests/vector_perf | |
tests/variant_perf | |
check-formatting: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: | | |
git submodule update --init | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' | |
sudo apt update | |
sudo apt install clang-format-17 | |
- name: Check C++ formatting | |
run: | | |
python tools/format.py -c |