From c5f99b0a29ee76d7f1988718b5821ab9c68838be Mon Sep 17 00:00:00 2001 From: John Dziurlaj Date: Mon, 2 Feb 2026 12:53:46 -0500 Subject: [PATCH 01/10] Improve build process --- Makefile | 66 ++++++++++++++----- cmake/tools.cmake | 12 ++-- src/CMakeLists.txt | 10 +-- src/electionguard-ui/Directory.Packages.props | 5 +- .../ElectionGuard.UI/ElectionGuard.UI.csproj | 30 +++++---- .../ElectionGuard.UI/Services/TallyManager.cs | 4 +- 6 files changed, 83 insertions(+), 44 deletions(-) diff --git a/Makefile b/Makefile index 32fd19ef..2c2a3890 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ EMSDK?=$(ELECTIONGUARD_CACHE)/emscripten # not all platforms can compile all targets. # valid values: # OPERATING_SYSTEM: Android, Ios, Linux, Darwin, Windows +# OS_VARIANT: Debian, Alpine # PROCESSOR: arm64, x64, x86 ifeq ($(OS),Windows_NT) OPERATING_SYSTEM ?= Windows @@ -114,18 +115,42 @@ ifeq ($(OPERATING_SYSTEM),Darwin) endif ifeq ($(OPERATING_SYSTEM),Linux) @echo 🐧 LINUX INSTALL - sudo apt install -y build-essential - sudo apt install -y iwyu - sudo apt install -y llvm - sudo apt install -y clang-12 - sudo apt install -y cmake - sudo apt install -y lcov - sudo apt install -y cppcheck - sudo apt install -y clang-format - sudo apt install -y clang-tidy - sudo apt install -y ninja-build - sudo apt install -y valgrind - sudo apt install -y unzip + if [ -f /etc/os-release ] && grep -qi "alpine" /etc/os-release; then \ + echo "🏔️ Alpine Linux detected"; \ + sudo apk update; \ + echo "Installing CXX dependencies"; \ + sudo apk add make musl-dev g++ cmake; \ + echo "Installing DotNet dependencies" +# See https://learn.microsoft.com/en-us/dotnet/core/install/linux-alpine?tabs=dotnet9 + sudo apk add dotnet9-sdk dotnetcore9-runtime + else \ + echo "🐧 Debian-based Linux detected"; \ +# to get Debian version of .NET + wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb + sudo dpkg -i packages-microsoft-prod.deb + rm packages-microsoft-prod.deb + + sudo apt update; \ + sudo apt install -y build-essential + sudo apt install -y iwyu + sudo apt install -y llvm +# must update to bc bookworm doesn't have clang 12 anymore... +# maybe don't specify a version unless we need older behavior?? + sudo apt install -y clang-14 + sudo apt install -y cmake + sudo apt install -y lcov + sudo apt install -y cppcheck + sudo apt install -y clang-format + sudo apt install -y clang-tidy + sudo apt install -y ninja-build + sudo apt install -y valgrind + sudo apt install -y unzip +# dotnet deps + sudo apt install -y dotnet-sdk-9.0 +# wasm deps + sudo apt install -y npm + fi + endif ifeq ($(OPERATING_SYSTEM),Windows) @echo 🏁 WINDOWS INSTALL @@ -134,11 +159,19 @@ ifeq ($(OPERATING_SYSTEM),Windows) choco upgrade cmake -y choco upgrade ninja -y choco upgrade vswhere -y + choco upgrade llvm -y endif wget -O cmake/CPM.cmake https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.38.2/CPM.cmake make fetch-sample-data dotnet tool restore +environment-dotnet: +ifeq ($(OPERATING_SYSTEM),Linux) +# Ubuntu 22.04 and later? + sudo add-apt-repository ppa:dotnet/backports + apt-get update && sudo apt-get install -y dotnet-sdk-7.0 +endif + environment-msys2: ifeq ($(OPERATING_SYSTEM),Windows) @echo 🏁 MSYS2 INSTALL @@ -187,6 +220,7 @@ ifeq ($(OPERATING_SYSTEM),Windows) cmake -S . -B $(ELECTIONGUARD_BUILD_LIBS_DIR)/$(OPERATING_SYSTEM)/$(PROCESSOR)/$(TARGET) \ -G "Visual Studio 18" -A $(VSPLATFORM) \ -DCMAKE_BUILD_TYPE=$(TARGET) \ + -DCMAKE_OBJECT_PATH_MAX=200 \ -DBUILD_SHARED_LIBS=ON \ -DDISABLE_VALE=$(TEMP_DISABLE_VALE) \ -DUSE_MSVC=ON \ @@ -305,6 +339,7 @@ build-cli: dotnet build -c $(TARGET) $(ELECTIONGUARD_APP_CLI_DIR)/ElectionGuard.CLI.sln /p:Platform=$(PROCESSOR) build-ui: +# TODO: add platform checks, will not work on Linux! @echo 🖥️ BUILD UI $(OPERATING_SYSTEM) $(PROCESSOR) $(TARGET) cd ./src/electionguard-ui && dotnet restore dotnet build -c $(TARGET) ./src/electionguard-ui/ElectionGuard.UI.sln /p:Platform=$(PROCESSOR) /p:APPCENTER_SECRET_UWP=$(APPCENTER_SECRET_UWP) /p:APPCENTER_SECRET_MACOS=$(APPCENTER_SECRET_MACOS) @@ -388,7 +423,7 @@ generate-interop: # Lint / Format format: build - cd $(ELECTIONGUARD_BUILD_LIBS_DIR)/$(PROCESSOR) && $(MAKE) format + cd $(ELECTIONGUARD_BUILD_LIBS_DIR)/$(OPERATING_SYSTEM)/$(PROCESSOR) && $(MAKE) format lint: dotnet jb inspectcode -o="lint-results.xml" -f="Xml" --build --verbosity="WARN" --severity="Warning" bindings/netstandard/ElectionGuard/ElectionGuard.sln @@ -419,6 +454,7 @@ endif ifeq ($(OPERATING_SYSTEM),Darwin) dotnet publish -f net10.0-maccatalyst -c $(TARGET) /p:CreatePackage=true /p:ApplicationVersion=$(BUILD_NUMBER) /p:APPCENTER_SECRET_MACOS=$(APPCENTER_SECRET_MACOS) ./$(ELECTIONGUARD_APP_ADMIN_DIR)/ElectionGuard.UI/ElectionGuard.UI.csproj -o ./publish endif +# add error for running on Linuxx! publish-ui-appcenter: @echo 🧱 PUBLISH UI APPCENTER @@ -440,7 +476,7 @@ else @echo "APPCENTER_SECRET_MACOS not set. Skipping AppCenter publish" exit 1 endif - +# add linux check publish-wasm: build-npm @echo 🌐 PUBLISH WASM ifeq ($(OPERATING_SYSTEM),Windows) @@ -728,7 +764,7 @@ fetch-sample-data: @echo ⬇️ FETCH Sample Data wget -O $(TEMPFILE) https://github.com/microsoft/electionguard/releases/download/v1.0/sample-data.zip unzip -o $(TEMPFILE) - rm -f $(TEMPFILE) +# rm -f $(TEMPFILE) generate-sample-data: build-netstandard @echo Generate Sample Data diff --git a/cmake/tools.cmake b/cmake/tools.cmake index 81543159..988e98e4 100644 --- a/cmake/tools.cmake +++ b/cmake/tools.cmake @@ -5,7 +5,7 @@ option(CODE_COVERAGE "Enable code coverage" OFF) option(USE_STATIC_ANALYSIS "use static analysis tools" OFF) option(USE_DYNAMIC_ANALYSIS "use dynamic analysis tools" OFF) -option(USE_FORMATTING "use formatting tools" OFF) +option(USE_FORMATTING "use formatting tools" ON) function(use_valgrind TARGET_NAME) set(VALGRIND_LOG ${PROJECT_BINARY_DIR}/valgrind.log) @@ -20,7 +20,7 @@ function(use_valgrind TARGET_NAME) endfunction() # ---- Dependencies ---- -include(cmake/CPM_0.31.0.cmake) +include(cmake/CPM.cmake) CPMAddPackage( NAME StableCoder-cmake-scripts @@ -111,7 +111,7 @@ if(USE_DYNAMIC_ANALYSIS) endif() endif() -#if(USE_FORMATTING) -# message("++ Running with formatting") -# include(${StableCoder-cmake-scripts_SOURCE_DIR}/formatting.cmake) -#endif() +## if(USE_FORMATTING) +## message("++ Running with formatting") +## include(${StableCoder-cmake-scripts_SOURCE_DIR}/formatting.cmake) +## endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f257921c..70272830 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.14...3.16 FATAL_ERROR) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") # ---- Dependencies ---- -include(../cmake/CPM_0.31.0.cmake) +include(../cmake/CPM.cmake) CPMAddPackage( NAME date @@ -266,7 +266,7 @@ if(CODE_COVERAGE) target_code_coverage(${META_PROJECT_TARGET} AUTO) endif() -#if(USE_FORMATTING) -# message("++ Building with formatting") -# clang_format(format ${PROJECT_SOURCE_FILES}) -#endif() +## if(USE_FORMATTING) +## message("++ Building with formatting") +## clang_format(format ${PROJECT_SOURCE_FILES}) +## endif() diff --git a/src/electionguard-ui/Directory.Packages.props b/src/electionguard-ui/Directory.Packages.props index e641f943..1168729c 100644 --- a/src/electionguard-ui/Directory.Packages.props +++ b/src/electionguard-ui/Directory.Packages.props @@ -8,8 +8,9 @@ - - + + + diff --git a/src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj b/src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj index 61b5ff48..15ed64c7 100644 --- a/src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj +++ b/src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj @@ -1,8 +1,8 @@  - - net10.0-windows10.0.19041.0 + net7.0-maccatalyst + net7.0-windows10.0.19041.0 Exe true true @@ -20,7 +20,7 @@ 1.92.0 19 - + 15.3 10.0.19041.0 10.0.19041.0 @@ -37,31 +37,32 @@ $(DefineConstants);APPCENTER_SECRET_MACOS=$(APPCENTER_SECRET_MACOS);APPCENTER_SECRET_UWP=$(APPCENTER_SECRET_UWP) - + + false maccatalyst-arm64;maccatalyst-x64 - + true maccatalyst-arm64;maccatalyst-x64 - + false maccatalyst-x64 - + false maccatalyst-x64 - + false - + true @@ -69,7 +70,7 @@ - False + @@ -96,7 +97,7 @@ - False + @@ -149,11 +150,12 @@ - + + @@ -220,11 +222,11 @@ ..\..\..\build\libs ..\..\..\scripts - + $(DefineConstants);DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION portable - + $(DefineConstants);DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION portable diff --git a/src/electionguard-ui/ElectionGuard.UI/Services/TallyManager.cs b/src/electionguard-ui/ElectionGuard.UI/Services/TallyManager.cs index ab8937d8..c243aab2 100644 --- a/src/electionguard-ui/ElectionGuard.UI/Services/TallyManager.cs +++ b/src/electionguard-ui/ElectionGuard.UI/Services/TallyManager.cs @@ -5,12 +5,12 @@ using ElectionGuard.Decryption.Extensions; using ElectionGuard.Decryption.Shares; using ElectionGuard.Decryption.Tally; +using ElectionGuard.ElectionSetup; using ElectionGuard.Converters; using ElectionGuard.Extensions; using ElectionGuard.Guardians; using MongoDB.Driver; using Newtonsoft.Json; -using ElectionGuard.ElectionSetup; namespace ElectionGuard.UI.Services { @@ -381,7 +381,7 @@ private async Task HydrateGuardian( userId, keyCeremony, publicKeys, - backups.ToDictionary(k => k.GuardianId!, v => v.Backup!.ToRecord())) ?? throw new ElectionGuardException(nameof(userId)); + backups.ToDictionary(k => k.GuardianId!, v => v.Backup!)) ?? throw new ElectionGuardException(nameof(userId)); return guardian; } catch (Exception ex) From 72742afdff4ef5f0db3fc31b888848d42d29df98 Mon Sep 17 00:00:00 2001 From: John Dziurlaj Date: Tue, 24 Feb 2026 11:36:27 -0500 Subject: [PATCH 02/10] Fixed nested bash script syntax issue --- Makefile | 61 +++++++++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index 2c2a3890..32e1b95a 100644 --- a/Makefile +++ b/Makefile @@ -117,40 +117,32 @@ ifeq ($(OPERATING_SYSTEM),Linux) @echo 🐧 LINUX INSTALL if [ -f /etc/os-release ] && grep -qi "alpine" /etc/os-release; then \ echo "🏔️ Alpine Linux detected"; \ - sudo apk update; \ + sudo apk update; \ echo "Installing CXX dependencies"; \ sudo apk add make musl-dev g++ cmake; \ - echo "Installing DotNet dependencies" -# See https://learn.microsoft.com/en-us/dotnet/core/install/linux-alpine?tabs=dotnet9 - sudo apk add dotnet9-sdk dotnetcore9-runtime + echo "Installing DotNet dependencies"; \ + sudo apk add dotnet10-sdk dotnetcore10-runtime; \ else \ echo "🐧 Debian-based Linux detected"; \ -# to get Debian version of .NET - wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb - sudo dpkg -i packages-microsoft-prod.deb - rm packages-microsoft-prod.deb - + wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb; \ + sudo dpkg -i packages-microsoft-prod.deb; \ + rm packages-microsoft-prod.deb; \ sudo apt update; \ - sudo apt install -y build-essential - sudo apt install -y iwyu - sudo apt install -y llvm -# must update to bc bookworm doesn't have clang 12 anymore... -# maybe don't specify a version unless we need older behavior?? - sudo apt install -y clang-14 - sudo apt install -y cmake - sudo apt install -y lcov - sudo apt install -y cppcheck - sudo apt install -y clang-format - sudo apt install -y clang-tidy - sudo apt install -y ninja-build - sudo apt install -y valgrind - sudo apt install -y unzip -# dotnet deps - sudo apt install -y dotnet-sdk-9.0 -# wasm deps - sudo apt install -y npm + sudo apt install -y build-essential; \ + sudo apt install -y iwyu; \ + sudo apt install -y llvm; \ + sudo apt install -y clang-14; \ + sudo apt install -y cmake; \ + sudo apt install -y lcov; \ + sudo apt install -y cppcheck; \ + sudo apt install -y clang-format; \ + sudo apt install -y clang-tidy; \ + sudo apt install -y ninja-build; \ + sudo apt install -y valgrind; \ + sudo apt install -y unzip; \ + sudo apt install -y dotnet-sdk-10.0; \ + sudo apt install -y npm; \ fi - endif ifeq ($(OPERATING_SYSTEM),Windows) @echo 🏁 WINDOWS INSTALL @@ -160,17 +152,18 @@ ifeq ($(OPERATING_SYSTEM),Windows) choco upgrade ninja -y choco upgrade vswhere -y choco upgrade llvm -y + choco install dotnet-sdk endif wget -O cmake/CPM.cmake https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.38.2/CPM.cmake make fetch-sample-data dotnet tool restore -environment-dotnet: -ifeq ($(OPERATING_SYSTEM),Linux) -# Ubuntu 22.04 and later? - sudo add-apt-repository ppa:dotnet/backports - apt-get update && sudo apt-get install -y dotnet-sdk-7.0 -endif +# environment-dotnet: +# ifeq ($(OPERATING_SYSTEM),Linux) +# # Ubuntu 22.04 and later? +# sudo add-apt-repository ppa:dotnet/backports +# apt-get update && sudo apt-get install -y dotnet-sdk-10.0 +# endif environment-msys2: ifeq ($(OPERATING_SYSTEM),Windows) From 3eef3b26cfef8f8f75cf7158c783f7bb57ff8054 Mon Sep 17 00:00:00 2001 From: John Dziurlaj Date: Tue, 24 Feb 2026 13:00:31 -0500 Subject: [PATCH 03/10] Update JetBrains dependency --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 6518b9f3..2790704b 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "jetbrains.resharper.globaltools": { - "version": "2022.3.2", + "version": "2025.3.3", "commands": [ "jb" ] From 34202a19697f11d11c8e8f902d90ae2e8e4c1ebe Mon Sep 17 00:00:00 2001 From: John Dziurlaj Date: Tue, 24 Feb 2026 13:01:30 -0500 Subject: [PATCH 04/10] Update MacOS builds --- .github/workflows/pull-request-ui.yml | 6 +++--- .github/workflows/pull-request.yml | 18 +++++++++--------- .github/workflows/release.yml | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pull-request-ui.yml b/.github/workflows/pull-request-ui.yml index 94db206a..a06555bb 100644 --- a/.github/workflows/pull-request-ui.yml +++ b/.github/workflows/pull-request-ui.yml @@ -69,8 +69,8 @@ jobs: name: ["macOS", "windows-os"] include: - name: macOS - os: macOS-13 - version: "14.2" + os: macos-15 + version: "16.4" osFolder: "maccatalyst" - name: windows-os os: windows-2022 @@ -113,7 +113,7 @@ jobs: if: (runner.os == 'macOS' && steps.filter.outputs.any == 'true') run: | ls -ls /Applications/ - ls -ls $ANDROID_SDK_ROOT/ndk + # ANDROID_SDK_ROOT may not be set on all runners sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app - name: Configure Environment diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 46180e44..067d9916 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -68,8 +68,8 @@ jobs: "ubuntu-22.04-clang-14.0.0", "ubuntu-22.04-emscripten-3.1", "ubuntu-22.04-gcc-12.1.0", - "macos-13-xcode-14.2", - "macos-13-xcode-14.2-arm64", + "macos-15-intel-xcode-16.4", + "macos-15-xcode-16.4-arm64", "windows-2022-gcc-11", "windows-2022-msvc-latest-x86", "windows-2022-msvc-latest-x64", @@ -103,20 +103,20 @@ jobs: lint: false runCsTests: false runTsTests: false - - name: macOS-13-xcode-14.2 - os: macOS-13 + - name: macos-15-intel-xcode-16.4 + os: macos-15-intel processor: x64 compiler: xcode - version: "14.2" + version: "16.4" makeReleaseBuild: false lint: false runCsTests: true runTsTests: false - - name: macOS-13-xcode-14.2-arm64 - os: macOS-13 + - name: macos-15-xcode-16.4-arm64 + os: macos-15 processor: arm64 compiler: xcode - version: "14.2" + version: "16.4" makeReleaseBuild: false lint: false runCsTests: false @@ -246,7 +246,7 @@ jobs: if: (runner.os == 'macOS' && steps.filter.outputs.any == 'true') run: | ls -ls /Applications/ - ls -ls $ANDROID_SDK_ROOT/ndk + # ANDROID_SDK_ROOT may not be set on all runners sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app - name: Update Environment (Windows MSYS2) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 459dab65..94edcece 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,9 +59,9 @@ jobs: maccatalyst_build_arm64: name: MacCatalyst Build (arm64) - runs-on: macos-13 + runs-on: macos-15 env: - compiler_version: 14.2 + compiler_version: 16.4 steps: - name: Checkout Code uses: actions/checkout@v4 @@ -82,9 +82,9 @@ jobs: macos_build_arm64: name: MacOS Build (arm64) - runs-on: macos-13 + runs-on: macos-15 env: - compiler_version: 14.2 + compiler_version: 16.4 steps: - name: Checkout Code uses: actions/checkout@v4 @@ -105,9 +105,9 @@ jobs: macos_build_x64: name: MacOS Build (x64) - runs-on: macos-13 + runs-on: macos-15-intel env: - compiler_version: 14.2 + compiler_version: 16.4 steps: - name: Checkout Code uses: actions/checkout@v4 @@ -313,8 +313,8 @@ jobs: name: ["windows-os"] include: # - name: macOS - # os: macOS-13 - # version: "14.2" + # os: macos-15 + # version: "16.4" # osFolder: "maccatalyst" - name: windows-os os: windows-2022 From 78f0530dbe8f4cbf68be7089eef731b59d5a7224 Mon Sep 17 00:00:00 2001 From: John Dziurlaj Date: Tue, 24 Feb 2026 13:10:43 -0500 Subject: [PATCH 05/10] Fix regression --- .../ElectionGuard.UI/ElectionGuard.UI.csproj | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj b/src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj index 15ed64c7..8f75306e 100644 --- a/src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj +++ b/src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj @@ -1,8 +1,8 @@  - net7.0-maccatalyst - net7.0-windows10.0.19041.0 + net10.0-maccatalyst + net10.0-windows10.0.19041.0 Exe true true @@ -38,31 +38,31 @@ - + false maccatalyst-arm64;maccatalyst-x64 - + true maccatalyst-arm64;maccatalyst-x64 - + false maccatalyst-x64 - + false maccatalyst-x64 - + false - + true @@ -222,11 +222,11 @@ ..\..\..\build\libs ..\..\..\scripts - + $(DefineConstants);DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION portable - + $(DefineConstants);DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION portable From e3a4e30ab263a47e1702c1726c83dd57df9d4e3e Mon Sep 17 00:00:00 2001 From: John Dziurlaj Date: Tue, 24 Feb 2026 13:22:21 -0500 Subject: [PATCH 06/10] Update Xcode for MAUI builds --- .github/workflows/pull-request-ui.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-request-ui.yml b/.github/workflows/pull-request-ui.yml index a06555bb..d837e38f 100644 --- a/.github/workflows/pull-request-ui.yml +++ b/.github/workflows/pull-request-ui.yml @@ -69,8 +69,8 @@ jobs: name: ["macOS", "windows-os"] include: - name: macOS - os: macos-15 - version: "16.4" + os: macos-26 + version: "26.2" osFolder: "maccatalyst" - name: windows-os os: windows-2022 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94edcece..e2160c8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -313,8 +313,8 @@ jobs: name: ["windows-os"] include: # - name: macOS - # os: macos-15 - # version: "16.4" + # os: macos-26 + # version: "26.2" # osFolder: "maccatalyst" - name: windows-os os: windows-2022 From cf3e7aaacefadd257030139c35df29a73d4aa41f Mon Sep 17 00:00:00 2001 From: John Dziurlaj Date: Tue, 24 Feb 2026 13:43:02 -0500 Subject: [PATCH 07/10] Replace gcc test with clang on WIndows --- .github/workflows/pull-request.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 067d9916..13dc47f2 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -70,7 +70,7 @@ jobs: "ubuntu-22.04-gcc-12.1.0", "macos-15-intel-xcode-16.4", "macos-15-xcode-16.4-arm64", - "windows-2022-gcc-11", + "windows-2022-msys2-clang-14", "windows-2022-msvc-latest-x86", "windows-2022-msvc-latest-x64", "ubuntu-22.04-linter", @@ -121,11 +121,11 @@ jobs: lint: false runCsTests: false runTsTests: false - - name: windows-2022-gcc-11 + - name: windows-2022-msys2-clang-14 os: windows-2022 processor: x64 - compiler: gcc - version: "11" + compiler: clang + version: "14" makeReleaseBuild: false lint: false runCsTests: false @@ -320,6 +320,13 @@ jobs: if: (runner.os == 'Windows' && matrix.compiler == 'msvc' && steps.filter.outputs.cpp == 'true') run: make test + - name: Run Tests (Windows MSYS2) + env: + PROCESSOR: ${{ matrix.processor }} + if: (runner.os == 'Windows' && matrix.compiler == 'clang' && steps.filter.outputs.cpp == 'true') + shell: msys2 {0} + run: make test-msys2 + - name: Run Tests (Windows-x86) env: PROCESSOR: ${{ matrix.processor }} From 73c69aee7e61c215c5860d1678c1fb4c32612721 Mon Sep 17 00:00:00 2001 From: John Dziurlaj Date: Tue, 24 Feb 2026 13:51:08 -0500 Subject: [PATCH 08/10] Remove version suffixes from pacman pkgs --- .github/workflows/pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 13dc47f2..f77d96cb 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -259,9 +259,9 @@ jobs: base-devel mingw-w64-clang-x86_64-gcc mingw-w64-clang-x86_64-toolchain - mingw-w64-clang-x86_64-clang-14 + mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-cmake - mingw-w64-clang-x86_64-llvm-14 + mingw-w64-clang-x86_64-llvm make git From e7afaee81ea6ebb70f19a75e66e4fb69f8d4446e Mon Sep 17 00:00:00 2001 From: John Dziurlaj Date: Wed, 25 Feb 2026 08:22:07 -0500 Subject: [PATCH 09/10] Fix MacOS UI Build --- src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj b/src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj index 8f75306e..c37a70b0 100644 --- a/src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj +++ b/src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj @@ -69,7 +69,7 @@ - + portable @@ -96,7 +96,7 @@ - + portable From 49cd9b2b413affd3b612ce2dfafa84e34b31b73e Mon Sep 17 00:00:00 2001 From: John Dziurlaj Date: Wed, 25 Feb 2026 08:48:08 -0500 Subject: [PATCH 10/10] Do not build arm64 with maccatalyst --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 32e1b95a..aa16cd2c 100644 --- a/Makefile +++ b/Makefile @@ -332,10 +332,14 @@ build-cli: dotnet build -c $(TARGET) $(ELECTIONGUARD_APP_CLI_DIR)/ElectionGuard.CLI.sln /p:Platform=$(PROCESSOR) build-ui: -# TODO: add platform checks, will not work on Linux! @echo 🖥️ BUILD UI $(OPERATING_SYSTEM) $(PROCESSOR) $(TARGET) cd ./src/electionguard-ui && dotnet restore +ifeq ($(OPERATING_SYSTEM),Darwin) + dotnet build -f net10.0-maccatalyst -c $(TARGET) ./$(ELECTIONGUARD_APP_ADMIN_DIR)/ElectionGuard.UI/ElectionGuard.UI.csproj /p:APPCENTER_SECRET_MACOS=$(APPCENTER_SECRET_MACOS) +endif +ifeq ($(OPERATING_SYSTEM),Windows) dotnet build -c $(TARGET) ./src/electionguard-ui/ElectionGuard.UI.sln /p:Platform=$(PROCESSOR) /p:APPCENTER_SECRET_UWP=$(APPCENTER_SECRET_UWP) /p:APPCENTER_SECRET_MACOS=$(APPCENTER_SECRET_MACOS) +endif build-wasm: @echo 🌐 BUILD WASM $(OPERATING_SYSTEM) $(PROCESSOR) $(TARGET)