From 74cfbcccff671c79c4025ec41b53a7310de482da Mon Sep 17 00:00:00 2001 From: assertivist Date: Wed, 3 Dec 2025 22:29:34 -0800 Subject: [PATCH 1/2] Fix an issue in the CI where the Mac runner builds the entire app twice--once with xcode (for an app bundle) and once without (for tests). this commit moves the test compliation and running to use xcodebuild as well so that they can share intermediates. --- .github/workflows/avara-ci.yml | 4 ++-- Makefile | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/avara-ci.yml b/.github/workflows/avara-ci.yml index cb63abf9..936c382e 100644 --- a/.github/workflows/avara-ci.yml +++ b/.github/workflows/avara-ci.yml @@ -70,9 +70,9 @@ jobs: brew install googletest - uses: actions/checkout@v4 - name: Run headless tests - run: make tests + run: make -j4 mactests - name: make macdist - run: make -j4 clean macdist + run: make -j4 macdist - name: deploy main nightly if: startsWith(github.repository_owner, 'avaraline') && endsWith(github.ref, 'main') uses: WebFreak001/deploy-nightly@v1.0.1 diff --git a/Makefile b/Makefile index 4b1a5d0c..21242af1 100644 --- a/Makefile +++ b/Makefile @@ -121,6 +121,14 @@ macapp: ONLY_ACTIVE_ARCH=NO \ CONFIGURATION_BUILD_DIR=$(BUILD_DIR) +mactests: + xcodebuild -configuration Debug -scheme AvaraTests \ + -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=$(JOBS) \ + -derivedDataPath $(BUILD_DIR)/DerivedData \ + ONLY_ACTIVE_ARCH=NO \ + CONFIGURATION_BUILD_DIR=$(BUILD_DIR) + $(BUILD_DIR)/AvaraTests + macdist: macapp cd $(BUILD_DIR) && zip $(ZIPFLAGS) MacAvara.zip Avara.app && cd .. From 0ab65394be9f3780bc5fedd4e2891bf096200f13 Mon Sep 17 00:00:00 2001 From: Dan Watson Date: Thu, 4 Dec 2025 09:46:53 -0500 Subject: [PATCH 2/2] Standardize build settings between Avara and AvaraTests, update to macos-15 runner, update GitVersion.h on tests --- .github/workflows/avara-beta.yml | 2 +- .github/workflows/avara-ci.yml | 2 +- Avara.xcodeproj/project.pbxproj | 64 +++++++++++++++++++++++++++++--- Makefile | 1 - 4 files changed, 61 insertions(+), 8 deletions(-) diff --git a/.github/workflows/avara-beta.yml b/.github/workflows/avara-beta.yml index 9694f69f..bdfce1d9 100644 --- a/.github/workflows/avara-beta.yml +++ b/.github/workflows/avara-beta.yml @@ -35,7 +35,7 @@ jobs: max_releases: 1 macOS: name: MacOS - runs-on: macos-13 + runs-on: macos-15 steps: - name: install dependencies run: | diff --git a/.github/workflows/avara-ci.yml b/.github/workflows/avara-ci.yml index 936c382e..e326faa6 100644 --- a/.github/workflows/avara-ci.yml +++ b/.github/workflows/avara-ci.yml @@ -60,7 +60,7 @@ jobs: max_releases: 1 macOS: name: macOS - runs-on: macos-13 + runs-on: macos-15 steps: - name: install dependencies run: | diff --git a/Avara.xcodeproj/project.pbxproj b/Avara.xcodeproj/project.pbxproj index 7d746471..2cc97b27 100644 --- a/Avara.xcodeproj/project.pbxproj +++ b/Avara.xcodeproj/project.pbxproj @@ -2204,9 +2204,10 @@ isa = PBXNativeTarget; buildConfigurationList = E517F052299713990036B206 /* Build configuration list for PBXNativeTarget "AvaraTests" */; buildPhases = ( - E2DCC6552BDE0D1B00D70C49 /* Embed Frameworks */, + E573B9452EE1CC9B0086D426 /* Update GitVersion.h */, E517F048299713990036B206 /* Sources */, E517F049299713990036B206 /* Frameworks */, + E2DCC6552BDE0D1B00D70C49 /* Embed Frameworks */, E517F04A299713990036B206 /* CopyFiles */, ); buildRules = ( @@ -2342,6 +2343,25 @@ shellPath = /bin/sh; shellScript = "RESOURCEDIR=\"$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH\"\nrm \"$RESOURCEDIR\"/levels/*.r\nrm \"$RESOURCEDIR\"/rsrc/Avara.r\n"; }; + E573B9452EE1CC9B0086D426 /* Update GitVersion.h */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Update GitVersion.h"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "GIT_HASH=`/usr/bin/git describe --always --dirty` \ngrep -q $GIT_HASH src/util/GitVersion.h || (echo \"#define GIT_VERSION \\\"$GIT_HASH\\\"\" > src/util/GitVersion.h)\n"; + }; E5C57BC3298997B6008740F4 /* Update GitVersion.h */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -2896,12 +2916,19 @@ CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CODE_SIGN_STYLE = Manual; EXCLUDED_ARCHS = x86_64; - FRAMEWORK_SEARCH_PATHS = /Library/Frameworks; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + /Library/Frameworks, + ); HEADER_SEARCH_PATHS = ( "vendor/**", /opt/homebrew/include, /usr/local/include, ); + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", /opt/homebrew/lib, @@ -2923,12 +2950,19 @@ CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CODE_SIGN_STYLE = Manual; EXCLUDED_ARCHS = x86_64; - FRAMEWORK_SEARCH_PATHS = /Library/Frameworks; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + /Library/Frameworks, + ); HEADER_SEARCH_PATHS = ( "vendor/**", /opt/homebrew/include, /usr/local/include, ); + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", /opt/homebrew/lib, @@ -3067,7 +3101,11 @@ "$(LOCAL_LIBRARY_DIR)/Frameworks", ); GENERATE_INFOPLIST_FILE = YES; - HEADER_SEARCH_PATHS = "vendor/**"; + HEADER_SEARCH_PATHS = ( + "vendor/**", + /opt/homebrew/include, + /usr/local/include, + ); INFOPLIST_FILE = platform/macos/Info.plist; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.action-games"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; @@ -3077,6 +3115,12 @@ "$(inherited)", "@executable_path/../Frameworks", ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + /opt/homebrew/lib, + /usr/local/lib, + ); + MACOSX_DEPLOYMENT_TARGET = 10.13; MARKETING_VERSION = 1.0; OTHER_CFLAGS = ( "$(inherited)", @@ -3108,7 +3152,11 @@ "$(LOCAL_LIBRARY_DIR)/Frameworks", ); GENERATE_INFOPLIST_FILE = YES; - HEADER_SEARCH_PATHS = "vendor/**"; + HEADER_SEARCH_PATHS = ( + "vendor/**", + /opt/homebrew/include, + /usr/local/include, + ); INFOPLIST_FILE = platform/macos/Info.plist; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.action-games"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; @@ -3118,6 +3166,12 @@ "$(inherited)", "@executable_path/../Frameworks", ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + /opt/homebrew/lib, + /usr/local/lib, + ); + MACOSX_DEPLOYMENT_TARGET = 10.13; MARKETING_VERSION = 1.0; OTHER_CFLAGS = ( "$(inherited)", diff --git a/Makefile b/Makefile index 21242af1..72868baf 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,6 @@ mactests: xcodebuild -configuration Debug -scheme AvaraTests \ -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=$(JOBS) \ -derivedDataPath $(BUILD_DIR)/DerivedData \ - ONLY_ACTIVE_ARCH=NO \ CONFIGURATION_BUILD_DIR=$(BUILD_DIR) $(BUILD_DIR)/AvaraTests