From b48ca57dfcd3bc9c44b35f498b360fe56e81238a Mon Sep 17 00:00:00 2001 From: Paul Thompson Date: Wed, 21 Aug 2024 14:15:46 -0400 Subject: [PATCH] only use linux builds separate for testing and uploading artifact --- .github/workflows/cmake.yml | 124 ------------------------------------ README.md | 2 +- 2 files changed, 1 insertion(+), 125 deletions(-) delete mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml deleted file mode 100644 index 4df4932..0000000 --- a/.github/workflows/cmake.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: Linux Build - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - strategy: - matrix: - include: - - {"os": ubuntu-latest, - short: linux, - compiler: gcc, - shell: bash, - buildfolder: out/build/GCC/Release} - - {"os": ubuntu-latest, - short: linux, - compiler: clang, - shell: bash, - buildfolder: out/build/Clang/Release} - - runs-on: ${{matrix.os}} - - env: - VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" - - defaults: - run: - shell: '${{ matrix.shell }} {0}' - - steps: - - uses: actions/checkout@v3 - - - uses: seanmiddleditch/gha-setup-ninja@master - - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v7 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Install Qt - uses: jurplel/install-qt-action@v4 - with: - version: 6.7.2 - cache: true - - - name: Set QTDIR and QtToolsPath - shell: bash - run: | - echo "QTDIR=$QT_ROOT_DIR" >> "$GITHUB_ENV" - echo "QtToolsPath=$QT_ROOT_DIR/bin" >> "$GITHUB_ENV" - - - name: "Set environmental variables" - if: runner.os == 'Linux' || runner.os == 'Windows' - shell: bash - run: | - echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV - - - name: Install nasm and other libraries on Linux - if: runner.os == 'Linux' - run: sudo apt-get install -y nasm libxi-dev libxtst-dev libxrandr-dev libomp-14-dev lcov gcovr - - - name: Setup headless display - uses: pyvista/setup-headless-display-action@v2 - - - name: Install jinja2 - if: runner.os == 'Linux' - run: pip install jinja2 - - - name: Configure CMake with coverage - if: matrix.compiler == 'gcc' - run: cmake --preset ${{matrix.short}}-${{matrix.compiler}}-release -DCODE_COVERAGE=ON - - - name: Configure CMake without coverage - if: matrix.compiler != 'gcc' - run: cmake --preset ${{matrix.short}}-${{matrix.compiler}}-release - - - name: Build - run: cmake --build --preset ${{matrix.short}}-${{matrix.compiler}}-release - - - name: Test - run: ctest --verbose --preset ${{matrix.short}}-${{matrix.compiler}}-release -C ${{matrix.short}}-${{matrix.compiler}}-release - working-directory: ${{ github.workspace }} - - - name: Capture coverage info - if: matrix.compiler == 'gcc' && runner.os == 'Linux' - run: | - lcov --directory /home/runner/work/WhiskerToolbox/WhiskerToolbox/out/build/GCC/Release --capture --output-file coverage.info - lcov --remove coverage.info '/usr/*' '*/tests/*' '*/out/*' '*/opt/*' --output-file coverage.info - lcov --list coverage.info - - - name: Upload coverage to Coveralls - if: matrix.compiler == 'gcc' && runner.os == 'Linux' - uses: coverallsapp/github-action@v2 - with: - github-token: ${{ secrets.COVERALLS_REPO_TOKEN }} - path-to-lcov: coverage.info - - - name: Install - run: cmake --build --preset ${{matrix.short}}-${{matrix.compiler}}-release --target install - - - name: Package with cpack - run: | - pushd ${{matrix.buildfolder}} - cpack -G TGZ - popd - shell: bash - - - name: Find CPack Artifact - run: | - ARTIFACT_PATH=$(ls ${{matrix.buildfolder}}/*.tar.gz) - echo "ARTIFACT_PATH=$ARTIFACT_PATH" >> $GITHUB_ENV - shell: bash - - - name: Upload CPack Artifact - uses: actions/upload-artifact@v3 - with: - name: cpack-artifact - path: ${{ env.ARTIFACT_PATH }} \ No newline at end of file diff --git a/README.md b/README.md index ab3a8d5..e2bbbeb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![build](https://github.com/paulmthompson/WhiskerToolbox/actions/workflows/cmake.yml/badge.svg) +![build](https://github.com/paulmthompson/WhiskerToolbox/actions/workflows/linux_cmake.yml/badge.svg) ![build](https://github.com/paulmthompson/WhiskerToolbox/actions/workflows/mac_cmake.yml/badge.svg) ![build](https://github.com/paulmthompson/WhiskerToolbox/actions/workflows/windows_cmake.yml/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/paulmthompson/WhiskerToolbox/badge.svg?branch=main)](https://coveralls.io/github/paulmthompson/WhiskerToolbox?branch=main)