From 54c29ea68d6744578a1d0578cbfc4a585213bce5 Mon Sep 17 00:00:00 2001 From: Dasperal Date: Wed, 5 Jun 2024 22:38:45 +0300 Subject: [PATCH] Add CI builds --- .github/workflows/continuous-integration.yml | 66 ++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/continuous-integration.yml diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..942d7be --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,66 @@ +name: Continuous Integration + +on: + push: + branches: ["*"] + tags-ignore: ["*"] + pull_request: + branches: ["*"] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + Cmake: + name: ${{ matrix.config.display_name }} + runs-on: ${{ matrix.config.runner }} + strategy: + fail-fast: false + matrix: + config: + - + display_name: "WATCOM 1.9" + runner: "ubuntu-22.04" + shell: "bash" +# compiler_name: "" + watcom_version: "1.9" + cmake_preset: "ci-watcom" +# build_suffix: + + defaults: + run: + shell: ${{ matrix.config.shell }} + steps: + - uses: open-watcom/setup-watcom@v0 + with: + version: ${{ matrix.config.watcom_version }} + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Configure & Build + id: configure +# env: +# CC: ${{ matrix.config.compiler_name }} + run: | + rev_number=$(git rev-list --count HEAD) + cmake --workflow --preset "${{ matrix.config.cmake_preset }}" + sha_short=$(echo ${{ github.sha }} | cut -c1-7) + echo "sha_short=$sha_short" >> $GITHUB_OUTPUT + echo "rev_number=r$rev_number" >> $GITHUB_OUTPUT + +# - name: Install +# if: | +# github.repository == 'Russian-Doom/russian-doom-dos' +# run: | +# cmake --install build + + - name: Package Zip + if: | + github.repository == 'Russian-Doom/russian-doom-dos' + uses: actions/upload-artifact@v4 + with: + name: russian-doom-dos-${{ steps.configure.outputs.rev_number }}-${{ steps.configure.outputs.sha_short }} + path: ./build/install/