2022-07-26 13:52:31 +12:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
|
|
# events but only for the master branch
|
|
|
|
on:
|
|
|
|
push:
|
2022-09-13 06:49:37 +12:00
|
|
|
branches: [ master, github_ci ]
|
2022-07-26 13:52:31 +12:00
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
|
|
|
BUILD_TYPE: Release
|
|
|
|
|
|
|
|
jobs:
|
2022-09-13 06:49:37 +12:00
|
|
|
build-ubuntu:
|
2022-07-26 13:52:31 +12:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
|
|
steps:
|
|
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install libpng-dev
|
|
|
|
run: sudo apt-get install libpng-dev
|
|
|
|
|
|
|
|
- name: Create Build Environment
|
|
|
|
# Some projects don't allow in-source building, so create a separate build directory
|
|
|
|
# We'll use this as our working directory for all subsequent commands
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
|
|
|
|
- name: Configure CMake
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
# Use a bash shell so we can use the same syntax for environment variable
|
|
|
|
# access regardless of the host operating system
|
|
|
|
shell: bash
|
2022-09-13 06:49:37 +12:00
|
|
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_QT=OFF
|
2022-07-26 13:52:31 +12:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
# Execute the build. You can specify a specific target with "--target <NAME>"
|
|
|
|
run: cmake --build . -j8 --config $BUILD_TYPE
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
# Execute tests defined by the CMake configuration.
|
|
|
|
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
2022-07-26 14:49:24 +12:00
|
|
|
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE
|
2022-09-13 06:49:37 +12:00
|
|
|
|
|
|
|
build-ubuntu-debug:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
env:
|
|
|
|
BUILD_TYPE: Debug
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install libpng-dev
|
|
|
|
run: sudo apt-get install libpng-dev
|
|
|
|
|
|
|
|
- name: Create Build Environment
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
|
|
|
|
- name: Configure CMake
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_QT=OFF
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake --build . -j8 --config $BUILD_TYPE
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE
|
2022-09-13 07:00:53 +12:00
|
|
|
|
2022-09-13 07:32:33 +12:00
|
|
|
build-ubuntu-32bit:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2022-09-13 07:44:05 +12:00
|
|
|
- name: Install multilibs
|
|
|
|
run: sudo apt install gcc-multilib g++-multilib
|
2022-09-13 07:32:33 +12:00
|
|
|
|
|
|
|
- name: Create Build Environment
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
|
|
|
|
- name: Configure CMake
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake --build . -j8 --config $BUILD_TYPE
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE
|
|
|
|
|
2022-09-13 07:00:53 +12:00
|
|
|
build-windows-32bit:
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2022-09-13 07:22:05 +12:00
|
|
|
- name: Create Build Environment
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
|
|
|
|
- name: Configure CMake
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake $GITHUB_WORKSPACE -A Win32 -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake --build . -j8 --config $BUILD_TYPE
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: PATH=$PATH:"$(pwd)/backend/Release:$(pwd)/frontend/Release" ctest -V -C $BUILD_TYPE
|
|
|
|
|
|
|
|
build-windows-64bit:
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2022-09-13 07:00:53 +12:00
|
|
|
- name: Create Build Environment
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
|
|
|
|
- name: Configure CMake
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake --build . -j8 --config $BUILD_TYPE
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
2022-09-13 08:01:47 +12:00
|
|
|
run: PATH=$PATH:"$(pwd)/backend/Release:$(pwd)/frontend/Release" ctest -V -C $BUILD_TYPE
|
2022-09-13 07:57:05 +12:00
|
|
|
|
|
|
|
build-macOS:
|
|
|
|
runs-on: macOS-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Create Build Environment
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
|
|
|
|
- name: Configure CMake
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
2022-09-13 08:10:23 +12:00
|
|
|
run: SDKROOT="$(xcrun --sdk macosx --show-sdk-path)" cmake --build . -j8 --config $BUILD_TYPE
|
2022-09-13 07:57:05 +12:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
2022-09-13 08:10:23 +12:00
|
|
|
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE
|
2022-09-13 08:42:42 +12:00
|
|
|
|
|
|
|
build-macOS-sanitize:
|
|
|
|
runs-on: macOS-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Create Build Environment
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
|
|
|
|
- name: Configure CMake
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_SANITIZE=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: SDKROOT="$(xcrun --sdk macosx --show-sdk-path)" cmake --build . -j8 --config $BUILD_TYPE
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE
|