From c658acc2b311bb6676597845fe4464d2409314c4 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Wed, 15 Sep 2021 16:50:19 +0200 Subject: [PATCH] pipeline only on pull_requests (#3109) * Create debs * Update cmake.yml * give ccache a try * ccache round 2 * Update cmake.yml --- .github/workflows/cmake.yml | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 18221b3cb6..c220030050 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -1,8 +1,6 @@ name: CMake on: - push: - branches: [ master ] pull_request: branches: [ master ] @@ -22,31 +20,30 @@ jobs: - name: Install Building Dependancies run: sudo CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic - - name: Configure CMake - run: | - mkdir build - mkdir instdir - cmake -S . -B . -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX:PATH=instdir + - name: Prime ccache + uses: hendrikmuhs/ccache-action@v1 + with: + key: ${{ matrix.os }}-${{ env.BUILD_TYPE }} + max-size: 1000M - - name: Build - run: cmake --build . --config ${{env.BUILD_TYPE}} --parallel 3 + - name: Configure + run: cmake -S . -B . -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - - name: Test - working-directory: ${{github.workspace}}/build - run: ctest -C ${{env.BUILD_TYPE}} + - name: Buil + run: cmake --build . --config ${{env.BUILD_TYPE}} --parallel 3 - - name: Install OpenMW + - name: Install shell: bash run: cmake --install . - - name: Upload OpenMW Artifact + - name: Create Artifact shell: bash - working-directory: instdir + working-directory: install run: | ls -laR 7z a ../build_artifact.7z . - - name: Upload + - name: Upload Artifact uses: actions/upload-artifact@v1 with: path: ./build_artifact.7z