Skip to content

bump macos version #1299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/build-ios-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: C/C++ CI for iOS

on:
push:
branches:
- master
- main
- dev
- dev/*
- release/*
- buildme/*

pull_request:
branches:
- master
- main
- dev

schedule:
- cron: 0 2 * * 1-5

jobs:
build:
strategy:
matrix:
os: [macos-13, macos-15]
config: [release, debug]
simulator: ["'iPhone 16'", "'iPad Air 11-inch (M2)'"]
runs-on: ${{ matrix.os }}
steps:
- name: Grant write permissions to /usr/local
run: |
sudo chown -R $USER:staff /usr/local
- uses: actions/checkout@v2
with:
submodules: 'true'
continue-on-error: true
- name: build
run: |
if [[ "${{ matrix.os }}" == "macos-13" ]]; then
export IOS_DEPLOYMENT_TARGET=13.0;
elif [[ "${{ matrix.os }}" == "macos-15" ]]; then
export IOS_DEPLOYMENT_TARGET=15.0;
fi
./build-tests-ios.sh ${{ matrix.config }} ${{ matrix.simulator }}
35 changes: 0 additions & 35 deletions .github/workflows/build-ios-mac11.yml

This file was deleted.

45 changes: 45 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
cmake_minimum_required(VERSION 3.1.0)
project(MSTelemetry)

# Set installation prefix for macOS and Linux
if(UNIX AND NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation directory prefix" FORCE)
endif()


# Set installation prefix for Unix systems (macOS and Linux)
if(UNIX AND NOT DEFINED CMAKE_INSTALL_PREFIX)
# First try /usr/local
set(TEST_FILE "/usr/local/.ci_write_test")

# Try to create a test file
execute_process(
COMMAND ${CMAKE_COMMAND} -E touch "${TEST_FILE}"
RESULT_VARIABLE WRITE_RESULT
)

# Check if write was successful
if(WRITE_RESULT EQUAL 0)
# We have write access to /usr/local
set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation directory prefix" FORCE)
message(STATUS "Using /usr/local as installation prefix (write access confirmed)")
# Clean up test file
execute_process(COMMAND ${CMAKE_COMMAND} -E remove "${TEST_FILE}")
else()
# No write access, fall back to HOME directory
set(FALLBACK_DIR "$ENV{HOME}/mst_telemetry")

# Create the mst_telemetry directory
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory "${FALLBACK_DIR}"
RESULT_VARIABLE CREATE_DIR_RESULT
)

if(NOT CREATE_DIR_RESULT EQUAL 0)
message(FATAL_ERROR "Failed to create directory: ${FALLBACK_DIR}")
endif()

set(CMAKE_INSTALL_PREFIX "${FALLBACK_DIR}" CACHE PATH "Installation directory prefix" FORCE)
message(STATUS "No write access to /usr/local, created and using ${FALLBACK_DIR} instead")
endif()
endif()



set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
Expand Down
3 changes: 3 additions & 0 deletions build-tests-ios.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/sh
// Add current user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//

Should this comment start with #?

current_user=`id`
echo "CURRENT USER:" $current_user
cd ${0%/*}
SKU=${1:-release}
SIMULATOR=${2:-iPhone 8}
Expand Down
Loading