minor changes #631
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: continuous integration | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
# set CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
# set vcpkg root/installed directories | |
VCPKG_ROOT: C:/vcpkg | |
VCPKG_INSTALLED_DIR: C:/vcpkg/installed | |
VCPKG_TOOLCHAIN_FILE: C:/vcpkg/scripts/buildsystems/vcpkg.cmake | |
# WINDOWS_SDK: 22621 | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] | |
platform: ['x86', 'x64'] | |
exclude: | |
- os: 'ubuntu-latest' | |
platform: 'x86' | |
- os: 'windows-latest' | |
platform: 'x86' | |
- os: 'macos-latest' | |
# The CMake configure and build commands are platform agnostic and should work equally | |
# well on Windows or Mac. You can convert this to a matrix build if you need | |
# cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: Get latest Cmake and Ninja | |
uses: lukka/get-cmake@latest | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# - name: Install Windows SDK [Win32] | |
# if: ${{ matrix.os=='windows-latest' }} | |
# uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 | |
# with: | |
# sdk-version: ${{env.WINDOWS_SDK}} | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: Install dependencies (packages) [UNIX] | |
if: ${{ matrix.os=='ubuntu-latest' }} | |
uses: ./.github/actions/install_deps | |
with: | |
os: ${{matrix.os}} | |
- name: Install dependencies (packages) [Win32] | |
if: ${{ matrix.os=='windows-latest' }} | |
uses: ./.github/actions/install_deps_win32 | |
with: | |
os: ${{matrix.os}} | |
- name: Install dependencies (ACE) [UNIX] | |
if: ${{ matrix.os=='ubuntu-latest' }} | |
uses: ./.github/actions/install_ACE | |
with: | |
os: ${{matrix.os}} | |
# - name: Install dependencies (ACE) [Win32] | |
# if: ${{ matrix.os=='windows-latest' }} | |
# uses: ./.github/actions/install_ACE_win32 | |
# with: | |
# os: ${{matrix.os}} | |
# - name: Set environment variables [UNIX] | |
# if: ${{ matrix.os=='ubuntu-latest' }} | |
# run: | | |
# echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV | |
# - name: Set environment variables [Win32] | |
# if: ${{ matrix.os=='windows-latest' }} | |
# run: | | |
# echo "VCPKG_ROOT=$Env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Configure CMake [UNIX] | |
if: ${{ matrix.os=='ubuntu-latest' }} | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUI_FRAMEWORK=gtk -DBUILD_TEST_U=ON -DBUILD_TEST_I=ON | |
- name: Setup Developper Command Prompt [Win32] | |
if: ${{ matrix.os=='windows-latest' }} | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Configure CMake [Win32] | |
if: ${{ matrix.os=='windows-latest' }} | |
run: | | |
cmake -B ${{github.workspace}}\\build -G Ninja -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_TOOLCHAIN_FILE}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DVCPKG_USE=ON -DUI_FRAMEWORK=gtk -DBUILD_TEST_U=ON -DBUILD_TEST_I=ON | |
cmake -B ${{github.workspace}}\\build -G Ninja -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_TOOLCHAIN_FILE}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DVCPKG_USE=ON -DUI_FRAMEWORK=gtk -DBUILD_TEST_U=ON -DBUILD_TEST_I=ON | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Upload GitHub Actions artifact of vcpkg build logs [Win32] | |
if: ${{ matrix.os=='windows-latest' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vcpkg-logs-${{ matrix.os }} | |
path: ${{env.VCPKG_INSTALLATION_ROOT}}/buildtrees/**/*.log | |
if-no-files-found: ignore | |
overwrite: true | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} |