From 4eaf68d414c4adf0c2fd7b8746d9e6c9462d2464 Mon Sep 17 00:00:00 2001 From: David Hogan Date: Sat, 11 Dec 2021 11:30:21 +1100 Subject: [PATCH] Automated Github pull request build and test --- .github/workflows/build-on-pull-request.yml | 56 +++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/build-on-pull-request.yml diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml new file mode 100644 index 000000000..53f79fef4 --- /dev/null +++ b/.github/workflows/build-on-pull-request.yml @@ -0,0 +1,56 @@ +name: Build Pull Request +on: [pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build_linux: + name: Build and Test (Linux) + runs-on: ubuntu-latest + + steps: + - shell: bash + run: git config --global core.autocrlf input + + - name: Checkout Source + uses: actions/checkout@v2 + + - name: Install Dependencies + shell: bash + run: | + sudo apt-get update + sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass + + - name: Build + id: build + shell: bash + run: | + make -j2 bin USER_CFLAGS=-Werror + make -j2 lib QUIET=1 + make test QUIET=1 + make -j2 samples + make -C src clean + make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32- + make -C samples clean + make -j2 doc zip + + build_windows: + name: Build (Windows) + runs-on: windows-latest + + steps: + - shell: bash + run: git config --global core.autocrlf input + + - name: Checkout Source + uses: actions/checkout@v2 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + + - name: Build app (debug) + run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug + + - name: Build app (release) + run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release