From dd8aadff0b0689d713b29b0f0cd3b0fb2363d121 Mon Sep 17 00:00:00 2001 From: Ryan Myers Date: Wed, 11 May 2022 14:51:52 -0400 Subject: [PATCH] Update actions to seperate builds for PR's versus locally --- .github/workflows/VerifyBuild.yml | 4 +++- .github/workflows/VerifyPR.yml | 32 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/VerifyPR.yml diff --git a/.github/workflows/VerifyBuild.yml b/.github/workflows/VerifyBuild.yml index ce500476..c77e88a8 100644 --- a/.github/workflows/VerifyBuild.yml +++ b/.github/workflows/VerifyBuild.yml @@ -8,12 +8,14 @@ on: jobs: build: - + if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 + with: + submodules: recursive - name: Install packages run: | diff --git a/.github/workflows/VerifyPR.yml b/.github/workflows/VerifyPR.yml new file mode 100644 index 00000000..c9aab60f --- /dev/null +++ b/.github/workflows/VerifyPR.yml @@ -0,0 +1,32 @@ +name: Verify PR + +on: + pull_request_target: + branches: [ master ] + +jobs: + build: + if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' }} + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + + - name: Install packages + run: | + sudo apt-get update + sudo apt-get install -y build-essential pkg-config git python3 libssl-dev wget libcapstone-dev + + - name: Get ROM + run: wget -q -O baseroms/dkr.z64 ${{secrets.ROMURL}} + + - name: Build ROM + run: make + + - name: Verify Build + run: if [[ $(sha1sum -c --quiet sha1/dkr.us_1.0.sha1) = "" ]]; then echo "Signature OK"; else echo "Failed"; exit 1; fi