diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 9a1972461..4a1a177a4 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -5,7 +5,7 @@ jobs: cpplint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-python@v1 - run: pip install cpplint - run: cpplint --recursive . @@ -25,17 +25,25 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 with: - submodules: recursive + submodules: recursive - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.0.0 + - name: Load Build Cache + id: cache + uses: actions/cache@v2 + env: + cache-name: build-cache + with: + path: build + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('CMakeLists.txt') }} + - name: Run cmake run: | - cd ${{ github.workspace }} - mkdir build + if [ ! ${{ format('{0}', steps.cache.outputs.cache-hit) }} ]; then mkdir build fi cd build cmake .. -Dtest=ON @@ -101,14 +109,22 @@ jobs: node-version: 8 - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 with: submodules: recursive + - name: Load Build Cache + id: cache + uses: actions/cache@v2 + env: + cache-name: build-cache + with: + path: build + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('CMakeLists.txt') }} + - name: Run cmake run: | - cd ${{ github.workspace }} - mkdir build + if [ ! ${{ format('{0}', steps.cache.outputs.cache-hit) }} ]; then mkdir build fi cd build cmake .. -Dtest=ON @@ -176,14 +192,22 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 with: submodules: recursive + - name: Load Build Cache + id: cache + uses: actions/cache@v2 + env: + cache-name: build-cache + with: + path: build + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('CMakeLists.txt') }} + - name: Run cmake run: | - cd ${{ github.workspace }} - mkdir build + if [ ! ${{ format('{0}', steps.cache.outputs.cache-hit) }} ]; then mkdir build fi cd build cmake .. -Dtest=ON diff --git a/CHANGES.md b/CHANGES.md index d7c9a6652..5a52b8c39 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ Change Log ##### Additions :tada: * Switch CI builds to GitHub actions [#264](https://github.com/KhronosGroup/COLLADA2GLTF/pull/264) * Large-scale code cleanup and add cppcheck to CI to prevent backsliding [#265](https://github.com/KhronosGroup/COLLADA2GLTF/pull/265) +* Speed up CI build times [#189](https://github.com/KhronosGroup/COLLADA2GLTF/issues/189) ##### Fixes :wrench: * De-duplicate GLTF generated materials [#251](https://github.com/KhronosGroup/COLLADA2GLTF/issues/251)