From b44b50e8d19c71861d159fbd014a17d3fc173d58 Mon Sep 17 00:00:00 2001 From: Sebanisu Date: Mon, 16 Feb 2026 13:37:52 -0500 Subject: [PATCH 01/13] combine linux and windows jobs. --- .github/workflows/main-1.0.0.yaml | 65 ++++++++++++++++++++- .github/workflows/ubuntu.yaml | 93 ------------------------------- 2 files changed, 62 insertions(+), 96 deletions(-) delete mode 100644 .github/workflows/ubuntu.yaml diff --git a/.github/workflows/main-1.0.0.yaml b/.github/workflows/main-1.0.0.yaml index 70898945..d71308bc 100644 --- a/.github/workflows/main-1.0.0.yaml +++ b/.github/workflows/main-1.0.0.yaml @@ -8,7 +8,6 @@ on: paths-ignore: - '**/*.md' #- '**/*.toml' - - '.github/workflows/ubuntu.yaml' branches: - main tags: @@ -17,7 +16,6 @@ on: paths-ignore: - '**/*.md' #- '**/*.toml' - - '.github/workflows/ubuntu.yaml' branches: - main @@ -34,8 +32,69 @@ env: GIT_REDIRECT_STDERR: 2>&1 jobs: - Field-Map-Editor: + linux-build: + runs-on: ubuntu-latest + env: + _RELEASE_CONFIGURATION_PRESET: Release-linux # override for Linux + timeout-minutes: 1440 + steps: + - name: Check Ubuntu Version + run: lsb_release -a + - name: Set Git Config + run: | + git config --global core.autocrlf false + git config --global core.filemode false + git config --global core.longpaths true + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: Install Dependencies + run: | + sudo apt-get update + sudo add-apt-repository universe -y + sudo apt-get update + sudo apt-get install -y ninja-build libxmu-dev libxi-dev libgl-dev libxrandr-dev libxinerama-dev libxcursor-dev gcc-14 g++-14 \ + mono-complete + # GCC 14 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 + # GCC 13 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 50 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 50 + g++ --version + + - name: Check Disk Space + run: df -h + - name: Bootstrap vcpkg + run: ${{github.workspace}}/vcpkg/bootstrap-vcpkg.sh + + - name: Cache vcpkg binaries + uses: actions/cache@v4 + with: + path: ~/.cache/vcpkg/archives + key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }} + restore-keys: | + vcpkg-${{ runner.os }}- + + - name: Integrate vcpkg + run: ${{ github.workspace }}/vcpkg/vcpkg integrate install + + - name: Configure CMake + run: cmake --preset "${{ env._RELEASE_CONFIGURATION_PRESET }}" + + - name: Build + run: cmake --build --preset "${{ env._RELEASE_CONFIGURATION_PRESET }}" + + - name: Test + run: cmake --build --preset "${{ env._RELEASE_CONFIGURATION_PRESET }}" --target test + + windows-build: runs-on: windows-latest + needs: linux-build + env: + _RELEASE_CONFIGURATION_PRESET: Release-windows # override for Windows timeout-minutes: 1440 steps: - name: Set Git Config diff --git a/.github/workflows/ubuntu.yaml b/.github/workflows/ubuntu.yaml deleted file mode 100644 index c876cb8e..00000000 --- a/.github/workflows/ubuntu.yaml +++ /dev/null @@ -1,93 +0,0 @@ -# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. -# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml -name: Field-Map-Editor-linux - -run-name: 1.0.5.${{ github.run_number }} - -on: - workflow_dispatch: - push: - paths-ignore: - - '**/*.md' - #- '**/*.toml' - - '.github/workflows/main-1.0.0.yaml' - branches: - - main - tags: - - "*" - pull_request: - paths-ignore: - - '**/*.md' - #- '**/*.toml' - - '.github/workflows/main-1.0.0.yaml' - branches: - - main - -env: - _IS_BUILD_CANARY: false - _IS_GITHUB_RELEASE: false - _RELEASE_NAME: Field-Map-Editor - _RELEASE_VERSION: v0 - _RELEASE_CONFIGURATION_PRESET: Release-linux - _RELEASE_CONFIGURATION_RAW: Release - _BUILD_BRANCH: "${{ github.ref }}" - _CHANGELOG_VERSION: "0" - # GIT: Fix reporting from stderr to stdout - GIT_REDIRECT_STDERR: 2>&1 - -jobs: - Field-Map-Editor: - runs-on: ubuntu-latest - timeout-minutes: 1440 - steps: - - name: Check Ubuntu Version - run: lsb_release -a - - name: Set Git Config - run: | - git config --global core.autocrlf false - git config --global core.filemode false - git config --global core.longpaths true - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - fetch-depth: 0 - - name: Install Dependencies - run: | - sudo apt-get update - sudo add-apt-repository universe -y - sudo apt-get update - sudo apt-get install -y ninja-build libxmu-dev libxi-dev libgl-dev libxrandr-dev libxinerama-dev libxcursor-dev gcc-14 g++-14 \ - mono-complete - # GCC 14 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 - # GCC 13 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 50 - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 50 - g++ --version - - - name: Check Disk Space - run: df -h - - name: Bootstrap vcpkg - run: ${{github.workspace}}/vcpkg/bootstrap-vcpkg.sh - - - name: Cache vcpkg binaries - uses: actions/cache@v4 - with: - path: ~/.cache/vcpkg/archives - key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }} - restore-keys: | - vcpkg-${{ runner.os }}- - - - name: Integrate vcpkg - run: ${{ github.workspace }}/vcpkg/vcpkg integrate install - - - name: Configure CMake - run: cmake --preset "${{ env._RELEASE_CONFIGURATION_PRESET }}" - - - name: Build - run: cmake --build --preset "${{ env._RELEASE_CONFIGURATION_PRESET }}" - - - name: Test - run: cmake --build --preset "${{ env._RELEASE_CONFIGURATION_PRESET }}" --target test \ No newline at end of file From 588a84f24aca33c54491221ec21002c7dc3662b8 Mon Sep 17 00:00:00 2001 From: Sebanisu Date: Mon, 16 Feb 2026 15:01:30 -0500 Subject: [PATCH 02/13] Ignore AppImage files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 6d7da63a..fb99daf4 100644 --- a/.gitignore +++ b/.gitignore @@ -452,3 +452,5 @@ compile_commands.json .install .DS_Store fonts/ +*.AppImage +AppDir/* From a831249cb490e66d004fea0085b8aac2d3830bfc Mon Sep 17 00:00:00 2001 From: Sebanisu Date: Mon, 16 Feb 2026 15:32:09 -0500 Subject: [PATCH 03/13] add appimage code to the yml --- .github/workflows/main-1.0.0.yaml | 99 ++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main-1.0.0.yaml b/.github/workflows/main-1.0.0.yaml index d71308bc..77d64d4c 100644 --- a/.github/workflows/main-1.0.0.yaml +++ b/.github/workflows/main-1.0.0.yaml @@ -90,6 +90,92 @@ jobs: - name: Test run: cmake --build --preset "${{ env._RELEASE_CONFIGURATION_PRESET }}" --target test + - name: Build AppImage + run: | + set -euo pipefail + + APPDIR=".appdir" + DIST_DIR=".dist" + BUILD_DIR=".build/bin" + EXECUTABLE="field-map-editor" + DESKTOP_FILE="field-map-editor.desktop" + ICON_FILE="res/icon.png" + RESOURCE_DIRS=("res" "fonts") + + mkdir -p "$APPDIR/usr/bin" + mkdir -p "$APPDIR/usr/share/applications" + mkdir -p "$APPDIR/usr/share/icons/hicolor/256x256/apps" + mkdir -p "$DIST_DIR" + + # Copy executable + cp "$BUILD_DIR/$EXECUTABLE" "$APPDIR/usr/bin/" + + # Copy resources + for dir in "${RESOURCE_DIRS[@]}"; do + if [ -d "$dir" ]; then + cp -r "$dir" "$APPDIR/usr/bin/" + else + echo "Warning: resource directory '$dir' not found" + fi + done + + # Desktop file + cat > "$APPDIR/usr/share/applications/$DESKTOP_FILE" < "$APPDIR/AppRun" < Date: Mon, 16 Feb 2026 15:38:16 -0500 Subject: [PATCH 04/13] wrong tab layout oops --- .github/workflows/main-1.0.0.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main-1.0.0.yaml b/.github/workflows/main-1.0.0.yaml index 77d64d4c..64359017 100644 --- a/.github/workflows/main-1.0.0.yaml +++ b/.github/workflows/main-1.0.0.yaml @@ -90,7 +90,7 @@ jobs: - name: Test run: cmake --build --preset "${{ env._RELEASE_CONFIGURATION_PRESET }}" --target test - - name: Build AppImage + - name: Build AppImage run: | set -euo pipefail From 41f0b3181ec21144ae3a07d9183b68dc2e6bfa97 Mon Sep 17 00:00:00 2001 From: Sebanisu Date: Mon, 16 Feb 2026 16:00:39 -0500 Subject: [PATCH 05/13] add some debug output to see whats happening. --- .github/workflows/main-1.0.0.yaml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main-1.0.0.yaml b/.github/workflows/main-1.0.0.yaml index 64359017..34b557e9 100644 --- a/.github/workflows/main-1.0.0.yaml +++ b/.github/workflows/main-1.0.0.yaml @@ -166,8 +166,35 @@ jobs: -e "$APPDIR/usr/bin/$EXECUTABLE" \ --output appimage - # Move AppImage into .dist and rename - mv Field-Map-Editor-x86_64.AppImage "$DIST_DIR/Field-Map-Editor-1.0.5.${{ github.run_number }}-linux.AppImage" + # --- debug: list current directory --- + echo "=== Current directory files ===" + ls -lh + + # --- debug: list APPDIR --- + echo "=== AppDir files ===" + ls -lh "$APPDIR" + + # --- debug: list DIST_DIR before move --- + echo "=== DIST_DIR before move ===" + ls -lh "$DIST_DIR" + + # # Move AppImage into .dist and rename + # mv Field-Map-Editor-x86_64.AppImage "$DIST_DIR/Field-Map-Editor-1.0.5.${{ github.run_number }}-linux.AppImage" + + # --- move and rename --- + if [ -f "Field-Map-Editor-x86_64.AppImage" ]; then + mv Field-Map-Editor-x86_64.AppImage "$DIST_DIR/Field-Map-Editor-1.0.5.${{ github.run_number }}-linux.AppImage" + echo "Moved AppImage to $DIST_DIR" + else + echo "❌ AppImage not found in current directory!" + echo "Check linuxdeploy output above" + ls -lh + exit 1 + fi + + # --- final list of DIST_DIR --- + echo "=== DIST_DIR after move ===" + ls -lh "$DIST_DIR" - name: Upload Linux AppImages uses: actions/upload-artifact@v4 with: From 852b35d1d66085f329a526f9974018070c92ea36 Mon Sep 17 00:00:00 2001 From: Sebanisu Date: Mon, 16 Feb 2026 16:23:03 -0500 Subject: [PATCH 06/13] attempt to fix uploading appimage --- .github/workflows/main-1.0.0.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main-1.0.0.yaml b/.github/workflows/main-1.0.0.yaml index 34b557e9..42a7ab28 100644 --- a/.github/workflows/main-1.0.0.yaml +++ b/.github/workflows/main-1.0.0.yaml @@ -195,11 +195,14 @@ jobs: # --- final list of DIST_DIR --- echo "=== DIST_DIR after move ===" ls -lh "$DIST_DIR" + - name: Upload Linux AppImages uses: actions/upload-artifact@v4 with: name: linux-appimages - path: .dist/*.AppImage + path: ${{ github.workspace }}/.dist/*.AppImage + if-no-files-found: error + From a88405aebf002781d39469caebfe30a69a5dd3d3 Mon Sep 17 00:00:00 2001 From: Sebanisu Date: Mon, 16 Feb 2026 16:45:35 -0500 Subject: [PATCH 07/13] lets try printing the pwd and the .dist --- .github/workflows/main-1.0.0.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main-1.0.0.yaml b/.github/workflows/main-1.0.0.yaml index 42a7ab28..709f9042 100644 --- a/.github/workflows/main-1.0.0.yaml +++ b/.github/workflows/main-1.0.0.yaml @@ -194,8 +194,8 @@ jobs: # --- final list of DIST_DIR --- echo "=== DIST_DIR after move ===" - ls -lh "$DIST_DIR" - + ls -lh "$(pwd)/.dist/" + - name: Upload Linux AppImages uses: actions/upload-artifact@v4 with: From 70569e25beaab3f32db05551e242da1432edb8e5 Mon Sep 17 00:00:00 2001 From: Sebanisu Date: Mon, 16 Feb 2026 17:11:09 -0500 Subject: [PATCH 08/13] show the full path darn it --- .github/workflows/main-1.0.0.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main-1.0.0.yaml b/.github/workflows/main-1.0.0.yaml index 709f9042..0a7b9101 100644 --- a/.github/workflows/main-1.0.0.yaml +++ b/.github/workflows/main-1.0.0.yaml @@ -194,8 +194,11 @@ jobs: # --- final list of DIST_DIR --- echo "=== DIST_DIR after move ===" - ls -lh "$(pwd)/.dist/" + cd "$DIST_DIR" + pwd + ls -lh + - name: Upload Linux AppImages uses: actions/upload-artifact@v4 with: From bf38ea7f0e8a8916434031815f8e6b59abff6ce7 Mon Sep 17 00:00:00 2001 From: Sebanisu Date: Mon, 16 Feb 2026 17:32:12 -0500 Subject: [PATCH 09/13] lets try this --- .github/workflows/main-1.0.0.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main-1.0.0.yaml b/.github/workflows/main-1.0.0.yaml index 0a7b9101..85aa5baa 100644 --- a/.github/workflows/main-1.0.0.yaml +++ b/.github/workflows/main-1.0.0.yaml @@ -203,7 +203,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: linux-appimages - path: ${{ github.workspace }}/.dist/*.AppImage + path: ${{ github.workspace }}/.dist/Field-Map-Editor-1.0.5.${{ github.run_number }}-linux.AppImage if-no-files-found: error From d7bbb945f56b76f55ce1964d678503d412e84119 Mon Sep 17 00:00:00 2001 From: Sebanisu Date: Wed, 18 Feb 2026 14:21:35 -0500 Subject: [PATCH 10/13] add a dubug step that prints what is in the .dist directory for windows. --- .github/workflows/main-1.0.0.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/main-1.0.0.yaml b/.github/workflows/main-1.0.0.yaml index 85aa5baa..eaceabd8 100644 --- a/.github/workflows/main-1.0.0.yaml +++ b/.github/workflows/main-1.0.0.yaml @@ -259,6 +259,22 @@ jobs: name: linux-appimages path: .dist/ + - name: Debug list .dist contents + shell: pwsh + run: | + Write-Host "=== CURRENT DIR ===" + Get-Location + + Write-Host "=== DIST DIR EXISTS? ===" + if (Test-Path ".dist") { + Write-Host "YES" + } else { + Write-Host "NO" + } + + Write-Host "=== DIST CONTENTS ===" + Get-ChildItem -Recurse .dist | Format-Table -AutoSize + - name: Publish Canary release uses: ncipollo/release-action@v1 if: env._IS_GITHUB_RELEASE == 'true' && env._IS_BUILD_CANARY == 'true' && success() From 1f6cfaef4d2427c8b491c722b2a84b443abaca1e Mon Sep 17 00:00:00 2001 From: Sebanisu Date: Wed, 18 Feb 2026 14:25:06 -0500 Subject: [PATCH 11/13] remove ubuntu.yml from Readme --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index a2a17fcf..a1119826 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Field Map Editor -[![Windows Build](https://github.com/Sebanisu/Field-Map-Editor/actions/workflows/main-1.0.0.yaml/badge.svg)](https://github.com/Sebanisu/Field-Map-Editor/actions/workflows/main-1.0.0.yaml) -[![Linux Build](https://github.com/Sebanisu/Field-Map-Editor/actions/workflows/ubuntu.yaml/badge.svg)](https://github.com/Sebanisu/Field-Map-Editor/actions/workflows/ubuntu.yaml) +[![Windows / Linux Build](https://github.com/Sebanisu/Field-Map-Editor/actions/workflows/main-1.0.0.yaml/badge.svg)](https://github.com/Sebanisu/Field-Map-Editor/actions/workflows/main-1.0.0.yaml) [![C++ 23](https://img.shields.io/badge/C++%20-23-ff69b4.svg)](https://en.cppreference.com/w/cpp/23) [![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/Sebanisu/Field-Map-Editor/pulls) From 7737fdfd7b134bc6e30aa15478a8c499dbef1162 Mon Sep 17 00:00:00 2001 From: Sebanisu Date: Wed, 18 Feb 2026 15:17:02 -0500 Subject: [PATCH 12/13] add prepare step --- .github/workflows/main-1.0.0.yaml | 43 ++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main-1.0.0.yaml b/.github/workflows/main-1.0.0.yaml index eaceabd8..65480674 100644 --- a/.github/workflows/main-1.0.0.yaml +++ b/.github/workflows/main-1.0.0.yaml @@ -32,8 +32,49 @@ env: GIT_REDIRECT_STDERR: 2>&1 jobs: + prepare: + runs-on: ubuntu-latest + + outputs: + build_version: ${{ steps.vars.outputs.build_version }} + release_version: ${{ steps.vars.outputs.release_version }} + is_canary: ${{ steps.vars.outputs.is_canary }} + is_release: ${{ steps.vars.outputs.is_release }} + changelog_version: ${{ steps.vars.outputs.changelog_version }} + + steps: + - id: vars + shell: bash + run: | + BRANCH="${GITHUB_REF}" + BUILD_VERSION="1.0.5.${GITHUB_RUN_NUMBER}" + + IS_CANARY=false + IS_RELEASE=false + CHANGELOG_VERSION="0" + + if [[ "$BRANCH" == "refs/heads/main" || "$BRANCH" == "refs/tags/canary" ]]; then + IS_CANARY=true + IS_RELEASE=true + + elif [[ "$BRANCH" == refs/tags/* ]]; then + # emulate your substring logic + BASE="${BUILD_VERSION%.*}" + CHANGELOG_VERSION="${BASE//./}" + BUILD_VERSION="${BASE}.0" + IS_RELEASE=true + fi + + RELEASE_VERSION="$BUILD_VERSION" + + echo "build_version=$BUILD_VERSION" >> $GITHUB_OUTPUT + echo "release_version=$RELEASE_VERSION" >> $GITHUB_OUTPUT + echo "is_canary=$IS_CANARY" >> $GITHUB_OUTPUT + echo "is_release=$IS_RELEASE" >> $GITHUB_OUTPUT + echo "changelog_version=$CHANGELOG_VERSION" >> $GITHUB_OUTPUT linux-build: runs-on: ubuntu-latest + needs: prepare env: _RELEASE_CONFIGURATION_PRESET: Release-linux # override for Linux timeout-minutes: 1440 @@ -211,7 +252,7 @@ jobs: windows-build: runs-on: windows-latest - needs: linux-build + needs: [prepare, linux-build] env: _RELEASE_CONFIGURATION_PRESET: Release-windows # override for Windows timeout-minutes: 1440 From dfc639f230009f3c70624c8f7b573460fd549a69 Mon Sep 17 00:00:00 2001 From: Sebanisu Date: Wed, 18 Feb 2026 15:35:27 -0500 Subject: [PATCH 13/13] see if values are set --- .github/workflows/main-1.0.0.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main-1.0.0.yaml b/.github/workflows/main-1.0.0.yaml index 65480674..1772f6e5 100644 --- a/.github/workflows/main-1.0.0.yaml +++ b/.github/workflows/main-1.0.0.yaml @@ -67,6 +67,12 @@ jobs: RELEASE_VERSION="$BUILD_VERSION" + echo "Branch: $BUILD_BRANCH" + echo "Build Version: $BUILD_VERSION" + echo "Release Version: $RELEASE_VERSION" + echo "Is Canary: $IS_CANARY" + echo "Is Release: $IS_RELEASE" + echo "Changelog Version: $CHANGELOG_VERSION" echo "build_version=$BUILD_VERSION" >> $GITHUB_OUTPUT echo "release_version=$RELEASE_VERSION" >> $GITHUB_OUTPUT echo "is_canary=$IS_CANARY" >> $GITHUB_OUTPUT