diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 5a7ac918..d309c534 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -6,7 +6,8 @@ This directory contains GitHub Actions workflows for automated building and test ### build.yml -Main build workflow that runs on every push and pull request to main/master/develop branches. +Main build workflow that runs on pushes and pull requests for the `stable` and +`dev` branches, plus manual dispatches, published releases, and version tags. #### Jobs @@ -28,8 +29,8 @@ Main build workflow that runs on every push and pull request to main/master/deve 3. **build-simulator-windows** - Builds the Windows simulator - Platform: Windows (latest) - - Requirements: Qt 6.7.3 (includes MinGW 9.0), MSYS2 (FreeType, pkg-config) - - Target: `mingw32-make sim` + - Requirements: MSYS2 MinGW64 with Qt 6 packages, `libsystre`, FreeType, and `pkg-config` + - Target: `mingw32-make debug-sim` - Build ID: Uses GitHub Actions run number - Artifacts: `db48x.exe`, DLLs, help files @@ -51,8 +52,8 @@ Main build workflow that runs on every push and pull request to main/master/deve 6. **build-color-simulator-windows** - Builds the color DM32 simulator for Windows - Platform: Windows (latest) - - Requirements: Qt 6.7.3 (includes MinGW 9.0), MSYS2 (FreeType, pkg-config) - - Target: `mingw32-make color-dm32-sim` + - Requirements: MSYS2 MinGW64 with Qt 6 packages, `libsystre`, FreeType, and `pkg-config` + - Target: `mingw32-make debug-color-dm32-sim` - Build ID: Uses GitHub Actions run number - Artifacts: `db50x.exe`, DLLs, help files @@ -96,9 +97,9 @@ Main build workflow that runs on every push and pull request to main/master/deve - Artifacts: Distribution tarball (`db50x-v*.tgz`) with `.pg5`, `_qspi.bin`, help files 12. **build-release-package** - Creates release packages - - Runs only on pushes to main/master - - Depends on all other build jobs - - Creates `.tar.gz` archives of firmware builds + - Runs only for version-tag pushes + - Depends on all other build jobs + - Creates `.tar.gz` archives of firmware builds ## Code Signing diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b66a67e..ef877496 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,14 +23,14 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: '6.8.1' + version: '6.8.3' host: 'mac' target: 'desktop' arch: 'clang_64' @@ -79,7 +79,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive @@ -91,7 +91,7 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: '6.5.3' + version: '6.8.3' host: 'linux' target: 'desktop' modules: 'qtmultimedia' @@ -117,7 +117,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive @@ -133,18 +133,18 @@ jobs: mingw-w64-x86_64-make mingw-w64-x86_64-freetype mingw-w64-x86_64-pkg-config - mingw-w64-x86_64-libgnurx + mingw-w64-x86_64-libsystre mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-declarative mingw-w64-x86_64-qt6-multimedia mingw-w64-x86_64-qt6-translations mingw-w64-x86_64-qt6-tools - - name: Build simulator + - name: Build debug simulator shell: msys2 {0} run: | echo "${{ github.run_number }}" > .build_id - mingw32-make sim + mingw32-make debug-sim - name: Deploy Qt dependencies shell: msys2 {0} @@ -154,7 +154,8 @@ jobs: cp /mingw64/bin/libgcc_s_seh-1.dll . cp /mingw64/bin/libstdc++-6.dll . cp /mingw64/bin/libwinpthread-1.dll . - cp /mingw64/bin/libgnurx-0.dll . + cp /mingw64/bin/libsystre-0.dll . + cp /mingw64/bin/libtre-5.dll . cp /mingw64/bin/libintl-8.dll . cp /mingw64/bin/libiconv-2.dll . # Copy all Qt dependency DLLs @@ -181,7 +182,7 @@ jobs: if: ${{ env.WINDOWS_CERT_DATA != '' }} uses: lando/code-sign-action@v3 with: - file: debug/db48x.exe + file: db48x.exe certificate-data: ${{ secrets.WINDOWS_CERT_DATA }} certificate-password: ${{ secrets.WINDOWS_CERT_PASSWORD }} @@ -206,14 +207,14 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: '6.8.1' + version: '6.8.3' host: 'mac' target: 'desktop' arch: 'clang_64' @@ -262,7 +263,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive @@ -274,7 +275,7 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: '6.5.3' + version: '6.8.3' host: 'linux' target: 'desktop' modules: 'qtmultimedia' @@ -300,7 +301,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive @@ -316,18 +317,18 @@ jobs: mingw-w64-x86_64-make mingw-w64-x86_64-freetype mingw-w64-x86_64-pkg-config - mingw-w64-x86_64-libgnurx + mingw-w64-x86_64-libsystre mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-declarative mingw-w64-x86_64-qt6-multimedia mingw-w64-x86_64-qt6-translations mingw-w64-x86_64-qt6-tools - - name: Build color DM32 simulator + - name: Build debug color DM32 simulator shell: msys2 {0} run: | echo "${{ github.run_number }}" > .build_id - mingw32-make color-dm32-sim + mingw32-make debug-color-dm32-sim - name: Deploy Qt dependencies shell: msys2 {0} @@ -337,7 +338,8 @@ jobs: cp /mingw64/bin/libgcc_s_seh-1.dll . cp /mingw64/bin/libstdc++-6.dll . cp /mingw64/bin/libwinpthread-1.dll . - cp /mingw64/bin/libgnurx-0.dll . + cp /mingw64/bin/libsystre-0.dll . + cp /mingw64/bin/libtre-5.dll . cp /mingw64/bin/libintl-8.dll . cp /mingw64/bin/libiconv-2.dll . # Copy all Qt dependency DLLs @@ -364,7 +366,7 @@ jobs: if: ${{ env.WINDOWS_CERT_DATA != '' }} uses: lando/code-sign-action@v3 with: - file: debug/db50x.exe + file: db50x.exe certificate-data: ${{ secrets.WINDOWS_CERT_DATA }} certificate-password: ${{ secrets.WINDOWS_CERT_PASSWORD }} @@ -373,24 +375,21 @@ jobs: with: name: db50x-color-simulator-windows path: | - debug/db50x.exe - debug/*.dll - debug/platforms/ - debug/imageformats/ - debug/tls/ - debug/translations/ + db50x.exe + *.dll + platforms/ + imageformats/ + tls/ + translations/ help/ build-wasm: name: Build WebAssembly runs-on: ubuntu-latest - # setup-emsdk@v14 still declares node20; opt into Node 24 until a new release. - env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive @@ -399,8 +398,13 @@ jobs: sudo apt-get update sudo apt-get install -y libfreetype6-dev pkg-config + - name: Generate recorder config header + run: | + make -C recorder TARGET=opt BUILDENV=auto RECURSE=.config .config + cp recorder/.build/linux/opt/config.h recorder/config.h + - name: Setup Emscripten - uses: mymindstorm/setup-emsdk@v14 + uses: mymindstorm/setup-emsdk@v16 with: version: 'latest' @@ -432,12 +436,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive - name: Set up JDK 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '17' @@ -445,14 +449,14 @@ jobs: - name: Install Qt for Android uses: jurplel/install-qt-action@v4 with: - version: '6.8.1' + version: '6.8.3' host: 'linux' target: 'android' arch: 'android_arm64_v8a' modules: 'qtmultimedia' - name: Setup Android SDK - uses: android-actions/setup-android@v3 + uses: android-actions/setup-android@v4 - name: Install Android NDK run: | @@ -479,14 +483,19 @@ jobs: - name: List generated AAB files run: | - echo "Looking for AAB files in android directory:" - find android -name "*.aab" -type f 2>/dev/null || echo "No AAB files found" + echo "Looking for AAB files in workspace:" + find . -name "*.aab" -type f 2>/dev/null || echo "No AAB files found" + + - name: Verify generated AAB + run: test -f android/db48x.aab - name: Upload Android artifacts uses: actions/upload-artifact@v7 with: name: db48x-android + if-no-files-found: error path: | + android/*.aab android/**/*.aab help/ @@ -498,12 +507,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive - name: Set up JDK 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '17' @@ -511,14 +520,14 @@ jobs: - name: Install Qt for Android uses: jurplel/install-qt-action@v4 with: - version: '6.8.1' + version: '6.8.3' host: 'linux' target: 'android' arch: 'android_arm64_v8a' modules: 'qtmultimedia' - name: Setup Android SDK - uses: android-actions/setup-android@v3 + uses: android-actions/setup-android@v4 - name: Install Android NDK run: | @@ -545,14 +554,19 @@ jobs: - name: List generated AAB files run: | - echo "Looking for AAB files in android directory:" - find android -name "*.aab" -type f 2>/dev/null || echo "No AAB files found" + echo "Looking for AAB files in workspace:" + find . -name "*.aab" -type f 2>/dev/null || echo "No AAB files found" + + - name: Verify generated AAB + run: test -f android/db50x.aab - name: Upload Android artifacts uses: actions/upload-artifact@v7 with: name: db50x-android + if-no-files-found: error path: | + android/*.aab android/**/*.aab help/ @@ -562,7 +576,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive @@ -589,7 +603,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive @@ -616,7 +630,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: recursive @@ -717,7 +731,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 # Fetch full history for tag access @@ -752,10 +766,12 @@ jobs: mv artifacts/db50x-dm32-*.tar.gz releases/db50x-dm32.tar.gz mv artifacts/db50x-dm42n-*.tar.gz releases/db50x-dm42n.tar.gz - - name: Move Android artifacts + - name: Package Android artifacts run: | - mv artifacts/db48x-android-*.tar.gz releases/db48x-android.tar.gz - mv artifacts/db50x-android-*.tar.gz releases/db50x-android.tar.gz + cd artifacts/db48x-android + tar czf ../../releases/db48x-android.tar.gz * + cd ../db50x-android + tar czf ../../releases/db50x-android.tar.gz * - name: Extract tag message for release body run: | @@ -763,7 +779,7 @@ jobs: git tag -l --format='%(contents)' "${{ github.ref_name }}" > release_notes.md - name: Create Release and Upload Assets - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@v3 with: tag_name: ${{ github.ref_name }} name: ${{ github.ref_name }} diff --git a/Makefile b/Makefile index 3fa307a4..f8a07f46 100644 --- a/Makefile +++ b/Makefile @@ -379,7 +379,7 @@ TOOLS_BUILDS=$(dir $(wildcard tools/*/Makefile)) TOOLS=$(foreach t,$(TOOLS_BUILDS),$t$(notdir $(t:%/=%))) tools: $(TOOLS) tools/%: - $(PRINT_COMMAND) cd tools/$(*D) && $(MAKE) BUILDENV=auto TIME= DO_INSTALL= VARIANT=$(*D) + $(PRINT_COMMAND) cd tools/$(*D) && $(MAKE) BUILDENV=auto TIME= DO_INSTALL= VARIANT=$(*D) OUTPUT=./ clangdb: clangdb-color-dm32-sim clangdb-%: .ALWAYS @@ -576,7 +576,10 @@ QMAKE_ENV = export ANDROID_SDK_ROOT=$(ANDROID_SDK_ROOT) ; \ export ANDROID_NDK_ROOT=$(ANDROID_NDK_ROOT) ; \ export KEYSTORE_PATH=$(ANDROID_KEYSTORE) ; \ export JAVA_HOME=$(ANDROID_JAVA_HOME); -AAB_FILE=$(OUTPUT:%=%/)$(NAME).aab +# make-it-quick defaults OUTPUT to the workspace root; keep Android bundles +# under android/ unless the caller overrides ANDROID_OUTPUT_DIR explicitly. +ANDROID_OUTPUT_DIR ?= android +AAB_FILE=$(ANDROID_OUTPUT_DIR:%=%/)$(NAME).aab android-$(TARGET): $(AAB_FILE) android-%: qt-% @@ -585,18 +588,27 @@ android-%: qt-% $(QMAKEFILE): sim/android/AndroidManifest.xml sim/android/build.gradle # Deploy (and optionally sign) the AAB via androiddeployqt. androiddeployqt -# expects the .so at /libs/arm64-v8a/; the qmake build puts it in -# DESTDIR, so we must run make install INSTALL_ROOT= first. +# expects a build directory as --output and the .so staged under +# /libs/arm64-v8a/, so we must run make install INSTALL_ROOT= +# first. Normalize the final bundle to $(AAB_FILE) so workflows and helper +# scripts can upload a stable path. $(AAB_FILE): $(QMAKEFILE) qt-$(TARGET) $(PRINT_COMMAND) \ AAB="$(abspath $@)"; \ + OUTDIR="$(abspath $(dir $@))"; \ + mkdir -p "$$OUTDIR" && \ cd sim && \ - $(MAKE) -f $(