Add test building and execution to main workflow

This commit is contained in:
Lee *!* Clagett 2023-08-01 13:48:13 -04:00 committed by GitHub
parent 1c0d79c83d
commit e4de505506
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
name: CMake
name: ubuntu-latest
on:
push:
@ -16,7 +16,7 @@ env:
echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
jobs:
build:
build-ubuntu-latest-tests:
# 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
@ -51,9 +51,12 @@ jobs:
- name: Configure LWS
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/lws/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMONERO_SOURCE_DIR=${{github.workspace}}/monero -DMONERO_BUILD_DIR=${{github.workspace}}/monero/build ${{github.workspace}}/lws
run: cmake -B ${{github.workspace}}/lws/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMONERO_SOURCE_DIR=${{github.workspace}}/monero -DMONERO_BUILD_DIR=${{github.workspace}}/monero/build ${{github.workspace}}/lws -DBUILD_TESTS=ON
- name: Build LWS
# Build your program with the given configuration
run: cd ${{github.workspace}}/lws/build && make
run: (cd ${{github.workspace}}/lws/build && make)
- name: Run Tests
run: cd ${{github.workspace}}/lws/build && ctest