From d801402d60aa9fd5120117f374dc5e33b2687373 Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Fri, 28 Mar 2025 17:33:50 -0500 Subject: [PATCH 1/4] CI: Split build action into three parallel jobs --- .github/workflows/build.yml | 79 ++++++++++++++++++++++++++++++++----- 1 file changed, 70 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9808e9607..14c38efff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,14 +33,6 @@ jobs: - name: Prepare run: cp -R /orig . - # Build and link non-matching files to verify lack of errors - - name: Build non-matching - run: | - python configure.py --non-matching \ - --version ${{ matrix.version }} \ - --binutils /binutils --compilers /compilers - ninja - # Build the project - name: Build run: | @@ -67,10 +59,76 @@ jobs: build/${{ matrix.version }}/report.json build/${{ matrix.version }}/progress-commit.json + verifyNonMatching: + # This is a *private* build container. + # See docs/github_actions.md for more information. + container: ghcr.io/bfbbdecomp/bfbb-build:main + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # Add game versions here + version: [GQPE78] + + steps: + # Checkout the repository + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + submodules: recursive + + # Set Git config + - name: Git config + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + + # Copy the original files to the workspace + - name: Prepare + run: cp -R /orig . + + # Build and link non-matching files to verify lack of errors + - name: Build non-matching + run: | + python configure.py --non-matching \ + --version ${{ matrix.version }} \ + --binutils /binutils --compilers /compilers + ninja + + generatePreviousReport: + # This is a *private* build container. + # See docs/github_actions.md for more information. + container: ghcr.io/bfbbdecomp/bfbb-build:main + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # Add game versions here + version: [GQPE78] + + steps: + # Checkout the repository + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + submodules: recursive + + # Set Git config + - name: Git config + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + + # Copy the original files to the workspace + - name: Prepare + run: cp -R /orig . + # Generate report for previous commit - name: Generate previous report continue-on-error: true run: | + python configure.py --version ${{ matrix.version }} \ + --binutils /binutils --compilers /compilers git checkout HEAD^ ninja build/${{ matrix.version }}/report.json @@ -85,7 +143,10 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - needs: build + needs: + - build + - verifyNonMatching + - generatePreviousReport if: github.ref == 'refs/heads/main' steps: - name: Checkout website code From 3eb8d7f98258106708000121f3b55bd21db9b7c5 Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Fri, 28 Mar 2025 19:05:56 -0500 Subject: [PATCH 2/4] CI: Remove checkout fetch depth arg from jobs that do not require it --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 14c38efff..20da09028 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 2 submodules: recursive # Set Git config @@ -76,7 +75,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 2 submodules: recursive # Set Git config From 4878e9936c4acb0f7fc1a3f41923dfb5ef07405d Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Fri, 28 Mar 2025 19:06:45 -0500 Subject: [PATCH 3/4] CI: Refactor job naming and remove unnecessary website build dependency --- .github/workflows/build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20da09028..7231df068 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,7 +58,7 @@ jobs: build/${{ matrix.version }}/report.json build/${{ matrix.version }}/progress-commit.json - verifyNonMatching: + build-non-matching: # This is a *private* build container. # See docs/github_actions.md for more information. container: ghcr.io/bfbbdecomp/bfbb-build:main @@ -93,7 +93,7 @@ jobs: --binutils /binutils --compilers /compilers ninja - generatePreviousReport: + build-previous: # This is a *private* build container. # See docs/github_actions.md for more information. container: ghcr.io/bfbbdecomp/bfbb-build:main @@ -143,8 +143,7 @@ jobs: contents: write needs: - build - - verifyNonMatching - - generatePreviousReport + - build-previous if: github.ref == 'refs/heads/main' steps: - name: Checkout website code From d40ee55f29b793f23345c9af8e036a0daac524c3 Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Fri, 28 Mar 2025 19:07:16 -0500 Subject: [PATCH 4/4] CI: Fix command order in Generate previous report step --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7231df068..5382a09f5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -125,9 +125,9 @@ jobs: - name: Generate previous report continue-on-error: true run: | + git checkout HEAD^ python configure.py --version ${{ matrix.version }} \ --binutils /binutils --compilers /compilers - git checkout HEAD^ ninja build/${{ matrix.version }}/report.json # Upload previous report