From ec7f807ba126453e775dc99556f63f0a01e3bd21 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 4 Dec 2023 10:59:59 +0200 Subject: [PATCH] Add continuous integration workflows for Linux and MinGW Rename macOS workflow to match with others --- .github/workflows/build-linux.yml | 24 +++++++++++++++ .../{auto-build.yml => build-macos.yml} | 13 ++++----- .github/workflows/build-mingw.yml | 29 +++++++++++++++++++ 3 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/build-linux.yml rename .github/workflows/{auto-build.yml => build-macos.yml} (56%) create mode 100644 .github/workflows/build-mingw.yml diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml new file mode 100644 index 00000000..ab5fc475 --- /dev/null +++ b/.github/workflows/build-linux.yml @@ -0,0 +1,24 @@ +name: Linux CI + +on: + push + +jobs: + build-linux: + name: Build Linux + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + compiler: ["clang", "gcc"] + + steps: + - uses: actions/checkout@v4 + + - name: Install Dependencies + run: sudo apt update && sudo apt install libmad0-dev libopusfile-dev libsdl2-dev libvorbis-dev + + - name: Build with ${{ matrix.compiler }} + run: | + export MAKEFLAGS=--jobs=3\ --keep-going + make --jobs=3 --keep-going --directory=Quake CC=${{ matrix.compiler }} USE_SDL2=1 diff --git a/.github/workflows/auto-build.yml b/.github/workflows/build-macos.yml similarity index 56% rename from .github/workflows/auto-build.yml rename to .github/workflows/build-macos.yml index 7ed30897..3e00e928 100644 --- a/.github/workflows/auto-build.yml +++ b/.github/workflows/build-macos.yml @@ -1,28 +1,25 @@ -name: Auto Build +name: macOS CI on: push jobs: build: - runs-on: ${{ matrix.os }} + name: Build macOS + runs-on: macos-12 strategy: fail-fast: false - matrix: - os: [macos-12] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: macOS Build - if: runner.os == 'macOS' run: | cd MacOSX ./build-macos.sh - name: Upload macOS artifact - uses: actions/upload-artifact@v2 - if: runner.os == 'macOS' + uses: actions/upload-artifact@v3 with: name: macos path: | diff --git a/.github/workflows/build-mingw.yml b/.github/workflows/build-mingw.yml new file mode 100644 index 00000000..1a3fae1f --- /dev/null +++ b/.github/workflows/build-mingw.yml @@ -0,0 +1,29 @@ +name: MinGW CI + +on: + push + +jobs: + build-linux: + name: Build MinGW + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + config: + - target: win32 + package: i686-win32 + + - target: win64 + package: x86-64 + + steps: + - uses: actions/checkout@v4 + + - name: Install Dependencies + run: sudo apt update && sudo apt install gcc-mingw-w64-${{ matrix.config.package }} libz-mingw-w64-dev + + - name: Build with MinGW ${{ matrix.config.target }} + run: | + export MAKEFLAGS=--jobs=3\ --keep-going + cd Quake && ./build_cross_${{ matrix.config.target }}-sdl2.sh