From 234b4ed70f031f83a26e63266f458d65b4246ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjell=20Hedstr=C3=B6m=2E=20We=20are=20hiring=20=40=20Ganaz?= Date: Tue, 8 Mar 2022 20:42:02 -0700 Subject: [PATCH] Update cmake.yml (#437) * Renamed ci action files * added matrix setup for runs with both macos-latest and ubuntu-latest. --- .../{cpp.yml => buildAndRunTests.yml} | 2 +- .github/workflows/codeql-analysis.yml | 4 +-- .github/workflows/{cmake.yml => ctest.yml} | 29 +++++++++++++++++-- 3 files changed, 29 insertions(+), 6 deletions(-) rename .github/workflows/{cpp.yml => buildAndRunTests.yml} (96%) rename .github/workflows/{cmake.yml => ctest.yml} (70%) diff --git a/.github/workflows/cpp.yml b/.github/workflows/buildAndRunTests.yml similarity index 96% rename from .github/workflows/cpp.yml rename to .github/workflows/buildAndRunTests.yml index 0974c94..a8d202c 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/buildAndRunTests.yml @@ -1,4 +1,4 @@ -name: callScriptWithVerboseTestOut +name: ci/action verbose ctest script on: push: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f774df8..9ae7427 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,7 +9,7 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # -name: "CodeQL" +name: "ci/action CodeQL" on: push: @@ -29,7 +29,7 @@ jobs: fail-fast: false matrix: language: [ 'cpp' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'cmake' ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed diff --git a/.github/workflows/cmake.yml b/.github/workflows/ctest.yml similarity index 70% rename from .github/workflows/cmake.yml rename to .github/workflows/ctest.yml index 56ffe60..f0e7e38 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/ctest.yml @@ -1,4 +1,4 @@ -name: CTest +name: ci/action ctest on: push: @@ -9,18 +9,41 @@ on: env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release - + +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow +# if you have to do a quick fix and the CI is already running your new commit will kill already +# going processes before starting new ones +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + + + jobs: build: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + # 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 - runs-on: ubuntu-latest + #runs-on: ubuntu-latest + #runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 + - name: Run Linux Build + if: matrix.os == 'ubuntu-latest' + run: echo "Ubuntu Latest" > release_ubuntu + + - name: Run Mac Build + if: matrix.os == 'macos-latest' + run: echo "MacOS Latest" > release_mac + - 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