From 19a6b22a020ce300a710625deb2a013624605a7a Mon Sep 17 00:00:00 2001 From: averne <45773016+averne@users.noreply.github.com> Date: Tue, 13 Apr 2021 22:57:51 +0200 Subject: [PATCH] Add CI (#104) --- .github/workflows/build.yml | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 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..5f77495 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +on: [push, pull_request] + +jobs: + main: + strategy: + fail-fast: false + matrix: + job_name: ['linux', 'windows'] + + include: + - job_name: linux + os: ubuntu-latest + shell: bash {0} + + - job_name: windows + os: windows-latest + shell: msys2 {0} + + defaults: + run: + shell: ${{ matrix.shell }} + + name: hactool-${{ matrix.job_name }} + runs-on: ${{ matrix.os }} + + steps: + - uses: msys2/setup-msys2@v2 + if: matrix.os == 'windows-latest' + with: + path-type: inherit + msystem: MINGW64 + update: true + install: mingw-w64-x86_64-gcc mingw-w64-x86_64-make + + - uses: actions/checkout@v1 + + - run: | + mv config.mk.template config.mk + make -j$(nproc) + + - uses: actions/upload-artifact@v2 + with: + name: hactool-${{ matrix.job_name }} + path: hactool*