From 84baa9e7e2b18a9172e6f293cba558d9f105fc96 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Tue, 27 Aug 2024 17:56:12 +0200 Subject: [PATCH] add an action --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6685f06 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + push: + branches: + - main + +concurrency: + group: '${{ github.workflow }}-${{ github.ref_name }}' + cancel-in-progress: true + +jobs: + ci: + runs-on: [windows-latest, ubuntu-latest, macos-latest] + name: CI + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: 'source' + fetch-depth: 0 + + - name: Checkout tools repo + uses: actions/checkout@v4 + with: + repository: cristianadam/HelloWorld.git + path: HelloWorld + + - name: Use sccache action + uses: ./source/ + with: + key: MyKey-0 + + - name: Configure and build HelloWorld + working-directory: ${{github.workspace}}/HelloWorld + shell: bash + run: | + mkdir build + cd build + cmake -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache ../ + cmake --build . + + - name: Stop and check sccache + shell: bash + run: sccache --show-stats