diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 6b4d9154c..d616f2d51 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -34,22 +34,6 @@ jobs: fi mk/linux/build-mg.sh -m -d ${EXTRA_OPTS} make -C mk/linux/build -j$(nproc) VERBOSE=1 - - name: Prepare Snapshot - if: ${{ matrix.compiler == 'gcc' && matrix.os == 'ubuntu-20.04' }} - 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-20.04' }} - uses: actions/upload-artifact@v2 - with: - name: megaglest-${{ matrix.arch }}-${{ matrix.os }}-${{ matrix.compiler }} - path: | - mk/linux/megaglest - mk/linux/megaglest_editor - mk/linux/megaglest_g3dviewer - mk/linux/*.ini - !mk/linux/glest-dev.ini build-linux-other: strategy: diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml new file mode 100644 index 000000000..35c37b43c --- /dev/null +++ b/.github/workflows/snapshot.yml @@ -0,0 +1,40 @@ +name: Make Snapshot +concurrency: + group: build-${{ github.ref }} + cancel-in-progress: true +on: + push: + branches: [ develop ] + pull_request: + branches: [ develop ] +# The artifact only runs on the same distro that it was built on. +# TODO: make AppImage instead +jobs: + make-snapshot: + strategy: + fail-fast: false + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: Get dependencies + run: | + sudo apt-get update && sudo apt-get upgrade + sudo mk/linux/setupBuildDeps.sh + - name: Build + run: | + mk/linux/build-mg.sh -m + make -C mk/linux/build -j$(nproc) VERBOSE=1 + - name: Prepare Snapshot + 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 + uses: actions/upload-artifact@v2 + with: + name: megaglest-x64-ubuntu-20.04-gcc + path: | + mk/linux/megaglest + mk/linux/megaglest_editor + mk/linux/megaglest_g3dviewer + mk/linux/*.ini + !mk/linux/glest-dev.ini