diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 95346d6c..aacc4d22 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,13 +42,6 @@ jobs: - name: Checkout if: ${{ github.event_name == 'push' }} uses: actions/checkout@master - - - name: Checkout gh-pages - if: ${{ github.event_name == 'push' }} - uses: actions/checkout@master - with: - path: gh-pages - ref: gh-pages - name: Checkout agbcc uses: actions/checkout@master @@ -58,8 +51,11 @@ jobs: - name: Install tools run: | - sudo apt update && sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi + sudo apt update && sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi xorg-dev python3 -m pip install gitpython + # build-essential, git, and libpng-dev are already installed + # gcc-arm-none-eabi is only needed for the modern build + # as an alternative to dkP - name: Install agbcc run: | @@ -78,7 +74,6 @@ jobs: python3 scripts/progress.py text - name: Generate reports - if: ${{ github.event_name == 'push' }} run: | mkdir -p gh-pages/reports mkdir -p gh-pages/maps @@ -88,8 +83,37 @@ jobs: python3 scripts/progress.py shield-json -m > gh-pages/reports/progress-sa1-shield-matching.json echo "REPORTS_COMMIT_MSG=$( git log --format=%s ${GITHUB_SHA} )" >> $GITHUB_ENV cp sa1.map gh-pages/maps/${GITHUB_SHA}.map - - - name: Update reports + + - name: Upload progress + if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} + uses: actions/upload-artifact@v7 + with: + path: | + gh-pages + + publish-progress: + name: Publish progress + runs-on: ubuntu-24.04 + needs: [build-gba] + # Only able to run from repo pull requests (by maintainers, or on the main branch via push) + if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} + permissions: + contents: write + steps: + - name: Checkout gh-pages + uses: actions/checkout@master + with: + path: gh-pages + ref: gh-pages + - name: Download progress + uses: actions/download-artifact@v7 + with: + path: | + gh-pages + - run: | + cd gh-pages + git status + - name: Publish reports if: ${{ github.event_name == 'push' }} uses: EndBug/add-and-commit@v7 with: diff --git a/tools/_shared/arena_alloc/Makefile b/tools/_shared/arena_alloc/Makefile index 7566e0c3..0ca13e05 100644 --- a/tools/_shared/arena_alloc/Makefile +++ b/tools/_shared/arena_alloc/Makefile @@ -3,7 +3,7 @@ CC = gcc SOURCE = arena_alloc.c -# Clear the default suffixes +# Clear the default suffixes (needed to fix build race condition) .SUFFIXES: .PHONY: all clean diff --git a/tools/_shared/c_header_parser/Makefile b/tools/_shared/c_header_parser/Makefile index dd0acca3..711ef312 100644 --- a/tools/_shared/c_header_parser/Makefile +++ b/tools/_shared/c_header_parser/Makefile @@ -8,6 +8,9 @@ SRCS = c_header_parser.c CFLAGS = -I $(ARENA_ALLOC_DIR) -Wall -Wextra -Werror $(NO_ERROR) -std=gnu11 -O2 +# Clear the default suffixes (needed to fix build race condition) +.SUFFIXES: + .PHONY: all clean all: libc_header_parser.a diff --git a/tools/_shared/csv_conv/Makefile b/tools/_shared/csv_conv/Makefile index 0aab418d..a786f725 100644 --- a/tools/_shared/csv_conv/Makefile +++ b/tools/_shared/csv_conv/Makefile @@ -9,6 +9,9 @@ SRCS = csv_conv.c CFLAGS = -I $(CSV_CONV_DIR) -Wall -Wextra -Werror $(NO_ERROR) -std=gnu11 -O2 LDFLAGS = +# Clear the default suffixes (needed to fix build race condition) +.SUFFIXES: + .PHONY: all clean all: libcsv_conv.a