.github/workflows/cmake.yml:cancel in progress jobs if newer job is started (#248)

This commit is contained in:
Andy Alt 2022-08-14 16:41:35 -05:00 committed by Rampoina
parent ebb0a5c731
commit 5b443a4c08
1 changed files with 11 additions and 8 deletions

View File

@ -1,4 +1,7 @@
name: CMake name: CMake
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
on: on:
push: push:
@ -23,7 +26,7 @@ jobs:
run: | run: |
sudo apt update sudo apt update
sudo mk/linux/setupBuildDeps.sh sudo mk/linux/setupBuildDeps.sh
- name: Bulid MegaGlest With GCC Compiler - name: Bulid MegaGlest With GCC Compiler
if: ${{ matrix.compiler == 'gcc' }} if: ${{ matrix.compiler == 'gcc' }}
env: env:
@ -43,7 +46,7 @@ jobs:
run: | run: |
cp mk/shared/*.ini mk/linux/ cp mk/shared/*.ini mk/linux/
strip -g mk/linux/megaglest mk/linux/megaglest_editor mk/linux/megaglest_g3dviewer strip -g mk/linux/megaglest mk/linux/megaglest_editor mk/linux/megaglest_g3dviewer
- name: Create Mega Glest Snapshot - name: Create Mega Glest Snapshot
if: ${{ matrix.compiler == 'gcc' && matrix.os == 'ubuntu-latest' }} if: ${{ matrix.compiler == 'gcc' && matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -73,7 +76,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Cache Vcpkg Libs - name: Cache Vcpkg Libs
uses: actions/cache@v2 uses: actions/cache@v2
env: env:
@ -81,7 +84,7 @@ jobs:
with: with:
path: c:/vcpkg/installed path: c:/vcpkg/installed
key: vcpkg-deps key: vcpkg-deps
- name: Install Dependencies - name: Install Dependencies
run: | run: |
vcpkg integrate install vcpkg integrate install
@ -121,7 +124,7 @@ jobs:
- name: Build Mega Glest - name: Build Mega Glest
# Build your program with the given configuration # Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config Release --target ALL_BUILD run: cmake --build ${{github.workspace}}/build --config Release --target ALL_BUILD
- name: Prepare Snapshot - name: Prepare Snapshot
run: | run: |
cd mk/windoze cd mk/windoze
@ -129,7 +132,7 @@ jobs:
$7zPath = $(Get-Command 7z).Source $7zPath = $(Get-Command 7z).Source
cp $7zPath . cp $7zPath .
cd ../.. cd ../..
- name: Create Mega Glest Snapshot - name: Create Mega Glest Snapshot
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
@ -154,7 +157,7 @@ jobs:
# - name: Get dependencies # - name: Get dependencies
# run: | # run: |
# brew install pkg-config cmake sdl2 lua jpeg libpng freetype ftgl libogg glew libvorbis cppunit fribidi miniupnpc curl wxmac xquartz zstd xml2 openldap # 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 # - name: Bulid MegaGlest With Clang Compiler
# if: ${{ matrix.compiler == 'clang' }} # if: ${{ matrix.compiler == 'clang' }}
# env: # env:
@ -166,6 +169,6 @@ jobs:
# mk/macos/build-mg.sh # mk/macos/build-mg.sh
# - name: Test # - name: Test
# working-directory: ${{github.workspace}}/build # 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 # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C ${{env.BUILD_TYPE}} # run: ctest -C ${{env.BUILD_TYPE}}