Skip to content
Closed

Macos #459

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
4 changes: 2 additions & 2 deletions .github/workflows/binding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-26, windows-latest]
python-version: ["3.10", "3.12"]

runs-on: ${{ matrix.os }}
Expand All @@ -37,7 +37,7 @@ jobs:
sudo apt install -y cmake build-essential doxygen libtbb-dev

- name: Install system dependencies (macOS)
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-26'
run: |
brew install cmake doxygen tbb

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cmake_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-26]

runs-on: ${{ matrix.os }}
if: github.event_name == 'push' || github.event.pull_request.draft == false
Expand All @@ -26,7 +26,7 @@ jobs:
if [ ${{ matrix.os }} == 'ubuntu-latest' ]; then
sudo apt update
sudo apt install binutils libtbb-dev
elif [ ${{ matrix.os }} == 'macos-latest' ]; then
elif [ ${{ matrix.os }} == 'macos-26' ]; then
brew install tbb
fi

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/cmake_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-26, windows-latest]

steps:
- name: Checkout
Expand All @@ -27,7 +27,7 @@ jobs:
sudo apt install -y lcov gcovr build-essential cmake libtbb-dev

- name: Install dependencies on macOS
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-26'
run: brew install tbb

- name: Install dependencies on Windows (vcpkg)
Expand All @@ -51,7 +51,7 @@ jobs:
cmake --build . -j$(nproc) --config Coverage

- name: Build on macOS
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-26'
working-directory: ${{ github.workspace }}
run: |
mkdir -p build
Expand All @@ -78,7 +78,7 @@ jobs:
run: cmake --install build --prefix ${GITHUB_WORKSPACE}/install

- name: Install on macOS
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-26'
working-directory: ${{ github.workspace }}
run: cmake --install build --prefix ${GITHUB_WORKSPACE}/install

Expand All @@ -100,7 +100,7 @@ jobs:
run: ctest --output-on-failure -j$(nproc)

- name: Run tests on macOS
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-26'
working-directory: ${{ github.workspace }}/build
run: ctest --output-on-failure -j$(sysctl -n hw.ncpu)

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
runs-on: ${{ (matrix.language == 'swift' && 'macos-26') || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.draft == false
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
build-wheels-macos:
name: Build wheels on macOS (Python ${{ matrix.python-version }})
needs: [check-version, uv-validate]
runs-on: macos-latest
runs-on: macos-26
if: needs.check-version.outputs.should_build == 'true' && (github.event_name == 'push' || github.event.pull_request.draft == false)
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ include(FetchContent)
FetchContent_Declare(
csv-parser
GIT_REPOSITORY https://github.com/vincentlaucsb/csv-parser
GIT_TAG 5.0.0)
GIT_TAG 3.2.0)
FetchContent_GetProperties(csv-parser)
if(NOT csv-parser_POPULATED)
FetchContent_MakeAvailable(csv-parser)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Standard](https://img.shields.io/badge/C%2B%2B-20/23-blue.svg)](https://en.wikipedia.org/wiki/C%2B%2B#Standardization)
[![TBB](https://img.shields.io/badge/TBB-2022.3.0-blue.svg)](https://github.com/oneapi-src/oneTBB)
[![SPDLOG](https://img.shields.io/badge/spdlog-1.17.0-blue.svg)](https://github.com/gabime/spdlog)
[![CSV](https://img.shields.io/badge/csv_parser-5.0.0-blue.svg)](https://github.com/vincentlaucsb/csv-parser)
[![CSV](https://img.shields.io/badge/csv_parser-3.2.0-blue.svg)](https://github.com/vincentlaucsb/csv-parser)
[![JSON](https://img.shields.io/badge/simdjson-4.6.1-blue.svg)](https://github.com/simdjson/simdjson)
[![SQLite](https://img.shields.io/badge/SQLiteCpp-3.3.3-blue.svg)](https://github.com/SRombauts/SQLiteCpp)
[![codecov](https://codecov.io/gh/Grufoony/DynamicalSystemFramework/graph/badge.svg?token=JV53J6IUJ3)](https://codecov.io/gh/Grufoony/DynamicalSystemFramework)
Expand Down
11 changes: 2 additions & 9 deletions examples/slow_charge_rb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
namespace fs = std::filesystem;

#include <thread>
#ifdef __APPLE__
#define thread_t std::thread
#else
#define thread_t std::jthread
#endif

#include <atomic>

std::atomic<unsigned int> progress{0};
Expand Down Expand Up @@ -132,7 +128,7 @@ int main(int argc, char** argv) {
// std::vector<int> deltas;

// lauch progress bar
thread_t t([]() {
std::jthread t([]() {
while (progress < MAX_TIME && !bExitFlag) {
printLoadingBar(progress, MAX_TIME);
std::this_thread::sleep_for(std::chrono::milliseconds(1500));
Expand Down Expand Up @@ -183,9 +179,6 @@ int main(int argc, char** argv) {
std::cout << '\n';
std::cout << "Done." << std::endl;

#ifdef __APPLE__
t.join();
#endif
std::cout << "Total elapsed time: "
<< std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::high_resolution_clock::now() - start)
Expand Down
10 changes: 1 addition & 9 deletions examples/slow_charge_tl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
namespace fs = std::filesystem;

#include <thread>
#ifdef __APPLE__
#define thread_t std::thread
#else
#define thread_t std::jthread
#endif
#include <atomic>

std::atomic<unsigned int> progress{0};
Expand Down Expand Up @@ -200,7 +195,7 @@ int main(int argc, char** argv) {
// std::vector<int> deltas;

// lauch progress bar
thread_t t([]() {
std::jthread t([]() {
while (progress < MAX_TIME && !bExitFlag) {
printLoadingBar(progress, MAX_TIME);
std::this_thread::sleep_for(std::chrono::milliseconds(1500));
Expand Down Expand Up @@ -296,9 +291,6 @@ int main(int argc, char** argv) {
std::cout << '\n';
std::cout << "Done." << std::endl;

#ifdef __APPLE__
t.join();
#endif
std::cout << "Total elapsed time: "
<< std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::high_resolution_clock::now() - start)
Expand Down
11 changes: 1 addition & 10 deletions examples/stalingrado.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
#include <string>

#include <thread>
#ifdef __APPLE__
#define thread_t std::thread
#else
#define thread_t std::jthread
#endif
#include <atomic>

std::atomic<unsigned int> progress{0};
Expand Down Expand Up @@ -84,7 +79,7 @@ int main() {
auto pItinerary = dynamics.itineraries().at(4);

// lauch progress bar
thread_t t([MAX_TIME]() {
std::jthread t([MAX_TIME]() {
while (progress < MAX_TIME) {
printLoadingBar(progress, MAX_TIME);
std::this_thread::sleep_for(std::chrono::milliseconds(1500));
Expand All @@ -110,9 +105,5 @@ int main() {
++progress;
}

#ifdef __APPLE__
t.join();
#endif

return 0;
}
Loading