From 66f2b9b1d48eb19464c3e48a6e811dd2f4fbdf6f Mon Sep 17 00:00:00 2001 From: Zachary Hall Date: Fri, 17 Nov 2023 13:00:57 -0800 Subject: [PATCH] Set up CI --- .github/workflows/linux.yml | 26 ++++++++++++++++++++++++++ .github/workflows/win.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/linux.yml create mode 100644 .github/workflows/win.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..0a8f82b --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,26 @@ +name: Build for Linux + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: apt update -y && apt install meson build-essential libmagick++-dev + - name: Set up build directory + run: meson setup builddir + - name: Build + run: meson compile -C builddir + - name: Upload built executable + uses: actions/upload-artifact@v3.1.3 + with: + name: linux + path: builddir/b16converter diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml new file mode 100644 index 0000000..7f43f40 --- /dev/null +++ b/.github/workflows/win.yml @@ -0,0 +1,31 @@ +name: Build for Windows using MSys2 + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + steps: + - uses: actions/checkout@v3 + - uses: msys2/setup-msys@v2 + with: + msystem: UCRT64 + update: true + install: git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-imagemagick mingw-w64-ucrt-x86_64-meson + - name: Set up build directory + run: meson setup builddir + - name: Build + run: meson compile -C builddir + - name: Upload built executable + uses: actions/upload-artifact@v3.1.3 + with: + name: windows + path: builddir/b16converter.exe