SPB Git

Repository Public MIT

build.sh 2.9 KB 65 lines shellscript

1#!/usr/bin/env bash2# =============================================================================3#                  SP BOUCHER | INFRASTRUCTURE & AUTOMATION4#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project          : ORIX Astra8# File             : Scripts/build.sh9# Module           : Scripts10# Repository       : https://git.spboucher.ai/orix-astra11# Created          : 2026-11-2112# Last Modified    : 2026-11-2113#14# Author           : Simon-Pierre Boucher15# Position         : Professor of Finance16# Institution      : Université du Québec en Outaouais (UQO)17# Organization     : SP Boucher18# Website          : https://spboucher.ai19# Git              : https://git.spboucher.ai20#21# Preferred Contact: support@spboucher.ai22# Technical Contact: dev@spboucher.ai23# Security/Admin   : admin@spboucher.ai24#25# Copyright (c) 202626# Simon-Pierre Boucher27# All rights reserved where applicable. This file is governed by the28# applicable project license, copyright notices and relevant law.29# Existing third-party rights and notices remain unaffected.30#31# License          : Proprietary, all rights reserved (see license file)32# License File     : LICENSE33#34# Do not embed credentials, private keys, access tokens,35# certificates or confidential personal information.36#37# =============================================================================38# END OF SP BOUCHER SOURCE HEADER39# =============================================================================4041# Usage: Scripts/build.sh generate | debug | core-tests | test [filter] | uitest42set -euo pipefail43cd "$(dirname "$0")/.."44SIM="${ORIX_SIM:-ORIXAstra iPhone}"45mkdir -p build/logs46step="${1:-debug}"47case "$step" in48  generate) xcodegen generate --quiet ;;49  debug)50    xcodegen generate --quiet51    xcodebuild -project ORIXAstra.xcodeproj -scheme ORIXAstra -configuration Debug -destination "platform=iOS Simulator,name=$SIM" \52      -derivedDataPath build/dd -skipMacroValidation -skipPackagePluginValidation build > build/logs/debug.log 2>&1 \53      || { grep -E "error:|\*\* " build/logs/debug.log | sort -u | head -40; exit 1; }54    grep -E "warning: " build/logs/debug.log | grep "ORIXAstra/Packages\|ORIXAstra/App" | sort -u | head -20 || true55    echo "BUILD SUCCEEDED" ;;56  test)57    ASTRA_NO_MLX=1 swift test --disable-keychain --scratch-path build/spm-main ${2:+--filter "$2"} 2>&1 | tee build/logs/test.log | grep -E "error|✘|failed|Test run|Executed" | tail -25 ;;58  uitest)59    xcodegen generate --quiet60    xcodebuild -project ORIXAstra.xcodeproj -scheme ORIXAstra -destination "platform=iOS Simulator,name=$SIM" -derivedDataPath build/dd \61      -skipMacroValidation -skipPackagePluginValidation test > build/logs/uitest.log 2>&1 || true62    grep -E "Test Case .*(passed|failed)|Executed|\*\* TEST" build/logs/uitest.log | tail -40 ;;63  *) echo "unknown step: $step"; exit 2 ;;64esac65
Files main
Menu

Theme