Working on Github Actions
This commit is contained in:
parent
417a739941
commit
4eac61cf4a
29
.github/workflows/build-and-test.yml
vendored
29
.github/workflows/build-and-test.yml
vendored
|
@ -19,14 +19,15 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {
|
- {
|
||||||
name: "Ubuntu_Latest_GCC",
|
name: "Ubuntu Latest GCC",
|
||||||
os: ubuntu-latest,
|
os: ubuntu-latest,
|
||||||
artifact: "ubuntu_gcc.7z",
|
artifact: "ubuntu_gcc.7z",
|
||||||
build_type: "Release",
|
build_type: "Release",
|
||||||
cc: "gcc",
|
cc: "gcc",
|
||||||
cxx: "g++",
|
cxx: "g++",
|
||||||
archiver: "7z a",
|
archiver: "7z a",
|
||||||
generators: "Ninja"
|
generators: "Ninja",
|
||||||
|
double_precision: false
|
||||||
}
|
}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -37,6 +38,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo github.event.action: ${{ github.event.action }}
|
echo github.event.action: ${{ github.event.action }}
|
||||||
echo github.event_name: ${{ github.event_name }}
|
echo github.event_name: ${{ github.event_name }}
|
||||||
|
|
||||||
- name: Install dependencies on windows
|
- name: Install dependencies on windows
|
||||||
if: startsWith(matrix.config.os, 'windows')
|
if: startsWith(matrix.config.os, 'windows')
|
||||||
run: |
|
run: |
|
||||||
|
@ -45,14 +47,15 @@ jobs:
|
||||||
cmake --version
|
cmake --version
|
||||||
# cmd "${{ matrix.config.environment_script }}"
|
# cmd "${{ matrix.config.environment_script }}"
|
||||||
|
|
||||||
- name: Install dependencies on ubuntu
|
- name: Install dependencies on Ubuntu
|
||||||
if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC')
|
if: startsWith(matrix.config.name, 'Ubuntu Latest GCC')
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install ninja-build cmake
|
sudo apt-get install ninja-build cmake
|
||||||
ninja --version
|
ninja --version
|
||||||
cmake --version
|
cmake --version
|
||||||
gcc --version
|
gcc --version
|
||||||
|
|
||||||
- name: Install dependencies on ubuntu9
|
- name: Install dependencies on ubuntu9
|
||||||
if: startsWith(matrix.config.name, 'Ubuntu_GCC_9')
|
if: startsWith(matrix.config.name, 'Ubuntu_GCC_9')
|
||||||
run: |
|
run: |
|
||||||
|
@ -88,25 +91,31 @@ jobs:
|
||||||
sudo update-alternatives --install /usr/bin/cmake cmake /opt/cmake/bin/cmake 1 --force
|
sudo update-alternatives --install /usr/bin/cmake cmake /opt/cmake/bin/cmake 1 --force
|
||||||
echo cmake version after
|
echo cmake version after
|
||||||
cmake --version
|
cmake --version
|
||||||
- name: Install dependencies on macos
|
|
||||||
|
- name: Install dependencies on MacOS
|
||||||
if: startsWith(matrix.config.os, 'macos')
|
if: startsWith(matrix.config.os, 'macos')
|
||||||
run: |
|
run: |
|
||||||
brew install p7zip cmake ninja
|
brew install cmake ninja
|
||||||
ninja --version
|
ninja --version
|
||||||
cmake --version
|
cmake --version
|
||||||
|
|
||||||
- name: Configure
|
- name: CMake Configure
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
mkdir instdir
|
|
||||||
cmake \
|
cmake \
|
||||||
-S . \
|
-S . \
|
||||||
-B . \
|
-B build \
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
||||||
|
-DRP3D_DOUBLE_PRECISION_ENABLED=${{ matrix.config.double_precision }} \
|
||||||
|
-DRP3D_COMPILE_TESTS=True \
|
||||||
-G "${{ matrix.config.generators }}" \
|
-G "${{ matrix.config.generators }}" \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=instdir
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cmake --build . --config ${{ matrix.config.build_type }}
|
run: cmake --build . --config ${{ matrix.config.build_type }}
|
||||||
|
|
||||||
|
- name: Unit Tests
|
||||||
|
shell: bash
|
||||||
|
run: ./build/test/tests
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user