Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows workflow, cleanup Linux workflows #59

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/build-test-linux.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
name: Build and run tests on Linux

on:
push:
branches: [master]
pull_request:
workflow_dispatch:

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: >
sudo sed -i 's/azure\.//' /etc/apt/sources.list &&
sudo apt-get update &&
sudo apt install libboost-all-dev libsdl2-dev libglew-dev libopenal-dev libmad0-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libwxgtk3.0-gtk3-dev libgmock-dev
run: |-
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo apt-get update
sudo apt install \
libboost-all-dev libsdl2-dev libglew-dev libopenal-dev libmad0-dev libwxgtk3.0-gtk3-dev libgmock-dev \
libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release

- name: Build
working-directory: ${{github.workspace}}/build
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/build-test-windows.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
name: Build and run tests on Windows

on:
workflow_dispatch:
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4

- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');

- name: Install dependencies
run: |-
vcpkg install --triplet x64-windows `
Expand All @@ -21,12 +29,12 @@ jobs:
cmake -S . -B build `
-G "Visual Studio 17 2022" -A x64 `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake

- name: Build solution
working-directory: ${{github.workspace}}/build
run: cmake --build .
run: cmake --build . --config Release

- name: Run tests
working-directory: ${{github.workspace}}/build
run: ctest -V
run: ctest -VV -C Release
Loading