From 6065a63da809b90e555346acad4f124e627d09a4 Mon Sep 17 00:00:00 2001 From: Ben McAvoy Date: Wed, 9 Oct 2024 00:41:35 +0100 Subject: [PATCH] ci: create build workflow --- .github/workflows/build.yml | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d48683c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,63 @@ +name: build +on: [push, pull_request, workflow_dispatch] + +jobs: + windows: + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + platform: [Win32, x64] + defaults: + run: + shell: cmd + steps: + - name: Checkout jenjin + uses: actions/checkout@v4 + with: + path: jenjin + submodules: 'recursive' + - name: Remove Strawberry Perl From Path + run: | + move /y C:\Strawberry C:\Strawberry_not_in_PATH + exit /b 0 + - name: Configure + env: + PLATFORM: ${{ matrix.platform }} + run: cmake -Bbuild -Hjenjin -T v142 -A %PLATFORM% -DCMAKE_INSTALL_PREFIX=%CD%\install + - name: Install + run: cmake --build build --config Release -j2 + - name: List + run: dir build\Release + - uses: actions/upload-artifact@v4 + with: + name: jenjin (windows) (${{ matrix.platform }}) + path: build/Release/jenjin/jenjin.exe + + linux: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: [x64] + steps: + - name: Checkout jenjin + uses: actions/checkout@v4 + with: + path: jenjin + submodules: 'recursive' + - name: Install Dependencies + run: | + sudo apt update + sudo apt install -y build-essential cmake + sudo apt install libwayland-dev libxkbcommon-dev xorg-dev + - name: Configure + env: + PLATFORM: ${{ matrix.platform }} + run: cmake -Bbuild -Hjenjin -DCMAKE_INSTALL_PREFIX=$PWD/install + - name: Build + run: cmake --build build --config Release -j2 + - uses: actions/upload-artifact@v4 + with: + name: jenjin (linux) + path: build/jenjin/jenjin