File tree Expand file tree Collapse file tree 2 files changed +21
-9
lines changed
Expand file tree Collapse file tree 2 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 1- brew install postgresql
2- brew install pkg-config
1+ #! /bin/bash
2+
3+ # Check if a package is already installed via Homebrew, then skip
4+ check_and_install () {
5+ if ! brew list $1 & > /dev/null; then
6+ echo " Installing $1 ..."
7+ brew install $1
8+ else
9+ echo " $1 is already installed"
10+ fi
11+ }
12+
13+ # Install packages if they don't exist
14+ check_and_install postgresql
15+ check_and_install pkg-config
Original file line number Diff line number Diff line change 1- # Workflow for building and testing the project
1+ # Backtesting C++ Workflow
2+ # To build, test and perform SonarCloud analysis
23name : Build
34
4- # Define when the workflow should run
55on :
66 push :
77 branches :
88 - main # Trigger on pushes to main branch
99 pull_request :
1010 types :
1111 - opened # When PR is first created
12- - edited # When PR description/title is edited
1312 - synchronize # When new commits are pushed to the PR
1413 - reopened # When PR is reopened after being closed
1514
3736 - name : Install dependencies
3837 run : bash ./.github/workflows/brew.sh
3938
40- # Step 4: Build project libraries
41- - name : Build libraries
39+ # Step 4: Build project external libraries
40+ - name : Build C++ Libraries
4241 run : bash ./.github/workflows/build.sh
4342
4443 # Step 5: Configure Xcode version
@@ -90,10 +89,10 @@ jobs:
9089 run : |
9190 g++ --version
9291 cmake --version
93- - name : Build libraries
92+ - name : Build C++ Libraries
9493 run : >
9594 bash ./.github/workflows/build.sh
96- - name : Set up Python 3.8 for gcovr
95+ - name : Install Python 3.12 for gcovr
9796 uses : actions/setup-python@v5
9897 with :
9998 python-version : 3.12
You can’t perform that action at this time.
0 commit comments