Skip to content

Commit

Permalink
.github/workflows/cmake.yml:cancel in progress jobs if newer job is s…
Browse files Browse the repository at this point in the history
…tarted (#248)
  • Loading branch information
andy5995 authored Aug 14, 2022
1 parent 22a474b commit e63d814
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: CMake
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

on:
push:
Expand All @@ -23,7 +26,7 @@ jobs:
run: |
sudo apt update
sudo mk/linux/setupBuildDeps.sh
- name: Bulid MegaGlest With GCC Compiler
if: ${{ matrix.compiler == 'gcc' }}
env:
Expand All @@ -43,7 +46,7 @@ jobs:
run: |
cp mk/shared/*.ini mk/linux/
strip -g mk/linux/megaglest mk/linux/megaglest_editor mk/linux/megaglest_g3dviewer
- name: Create Mega Glest Snapshot
if: ${{ matrix.compiler == 'gcc' && matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -73,15 +76,15 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Cache Vcpkg Libs
uses: actions/cache@v2
env:
cache-name: cache-vcpkg-deps
with:
path: c:/vcpkg/installed
key: vcpkg-deps

- name: Install Dependencies
run: |
vcpkg integrate install
Expand Down Expand Up @@ -121,15 +124,15 @@ jobs:
- name: Build Mega Glest
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config Release --target ALL_BUILD

- name: Prepare Snapshot
run: |
cd mk/windoze
cp ..\shared\*.ini .
$7zPath = $(Get-Command 7z).Source
cp $7zPath .
cd ../..
- name: Create Mega Glest Snapshot
uses: actions/upload-artifact@v2
with:
Expand All @@ -154,7 +157,7 @@ jobs:
# - name: Get dependencies
# run: |
# brew install pkg-config cmake sdl2 lua jpeg libpng freetype ftgl libogg glew libvorbis cppunit fribidi miniupnpc curl wxmac xquartz zstd xml2 openldap

# - name: Bulid MegaGlest With Clang Compiler
# if: ${{ matrix.compiler == 'clang' }}
# env:
Expand All @@ -166,6 +169,6 @@ jobs:
# mk/macos/build-mg.sh
# - name: Test
# working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C ${{env.BUILD_TYPE}}

0 comments on commit e63d814

Please sign in to comment.