From 9fa450f8e0e93e9f136ff22a1113e0f8db70fbe6 Mon Sep 17 00:00:00 2001 From: Ahmad El Sayed Date: Wed, 7 Feb 2024 18:14:02 +0100 Subject: [PATCH] Revert "misc improvements" This reverts commit 9a49b9e3181a823735acf0c6be69991400855c0a. --- .github/workflows/build-and-test-workflow.yml | 44 +++++-------------- 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build-and-test-workflow.yml b/.github/workflows/build-and-test-workflow.yml index b02856144..e067734e8 100644 --- a/.github/workflows/build-and-test-workflow.yml +++ b/.github/workflows/build-and-test-workflow.yml @@ -16,10 +16,11 @@ jobs: build: - name: build-${{ inputs.platform }}-${{ inputs.build_type }} - + # Build platform runs-on: ${{ inputs.platform }} + name: ${{ inputs.platform }}-${{ inputs.build_type }} + # The default compiler on macos is clang, switch to gcc 11. Specifying the version is necessary. # It seems like gcc and g++ are symbolic links to the default clang and clang++ compilers, respectively. # CMAKE_CXX_COMPILER_ID will evaluate to AppleClang rather than GNU on macos. @@ -27,11 +28,6 @@ jobs: CC: gcc-11 CXX: g++-11 - outputs: - build_dir: ${{ steps.paths.outputs.build_dir }} - deps_dir: ${{ steps.paths.outputs.ext_deps_dir }} - install_dir: ${{ steps.paths.outputs.install_dir }} - # Build steps steps: @@ -101,37 +97,19 @@ jobs: - name: Build run: cmake --build ${{ steps.paths.outputs.build_dir }} --config ${{ inputs.build_type }} -j - test: - - name: test-${{ inputs.platform }}-${{ inputs.build_type }} - - needs: build - - runs-on: ${{ inputs.platform }} - - steps: # Step: Test # Works if runner.os == 'Linux' or runner.os == 'macOS' # if runner.os == 'Windows', /inputs.build_type needs to be inserted before /tests - - name: Test backend - run: ${{ needs.build.outputs.build_dir }}/libs/MeshKernel/tests/MeshKernelUnitTests - - - name: Test API - run: ${{ needs.build.outputs.build_dir }}/libs/MeshKernelApi/tests/MeshKernelApiUnitTests - - artifact: - - name: artifact-${{ inputs.platform }}-${{ inputs.build_type }} - - needs: build - - runs-on: ${{ inputs.platform }} - - steps: + - name: Test + run: | + echo -e "\n*************** MeshKernel Tests ***************\n" + ${{ steps.paths.outputs.build_dir }}/libs/MeshKernel/tests/MeshKernelUnitTests + echo -e "\n\n*************** MeshKernel API Tests ***************\n" + ${{ steps.paths.outputs.build_dir }}/libs/MeshKernelApi/tests/MeshKernelApiUnitTests # Step: CMake install - name: Install - run: cmake --install ${{ needs.build.outputs.build_dir }} + run: cmake --install ${{ steps.paths.outputs.build_dir }} # Step: Upload artifacts - name: Upload artifacts @@ -139,5 +117,5 @@ jobs: if: always() with: name: meshkernel-${{ inputs.platform }}-${{ inputs.build_type }} - path: ${{ needs.build.outputs.install_dir }} + path: ${{ steps.paths.outputs.install_dir }} if-no-files-found: error