Skip to content

Commit

Permalink
Refactor GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dr8co committed Jun 12, 2024
1 parent 7d79b83 commit 97d7bab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

matrix:
os: [ ubuntu-24.04, macos-latest ]
build_type: [ Debug ] #[ Debug, Release ]
build_type: [ Debug ]
c_compiler: [ clang ]
include:
- os: macos-latest
Expand All @@ -24,14 +24,6 @@ jobs:
c_compiler: clang
cpp_compiler: clang++-18

# Don't include the following configurations in the matrix
# exclude:
# - os: macos-latest
# build_type: Debug
#
# - os: ubuntu-24.04
# build_type: Release

steps:
- name: Install Dependencies
if: matrix.os == 'macos-latest'
Expand Down Expand Up @@ -66,7 +58,7 @@ jobs:
- name: Configure CMake
if: matrix.os == 'macos-latest'
run: >
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++
-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/cpack-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ jobs:
- name: Configure CMake
if: matrix.os == 'macos-latest'
run: >
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++
-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang
-DCMAKE_CXX_FLAGS=" -stdlib=libstdc++ -stdlib++-isystem /opt/homebrew/Cellar/gcc/14.1.0_1/include/c++/14 -cxx-isystem /opt/homebrew/Cellar/gcc/14.1.0_1/include/c++/14/aarch64-apple-darwin23 -L /opt/homebrew/Cellar/gcc/14.1.0_1/lib/gcc/14 -Wl,-rpath,/opt/homebrew/opt/gcc/lib/gcc/current"
-DCMAKE_CXX_FLAGS="-stdlib++-isystem /opt/homebrew/Cellar/gcc/14.1.0_1/include/c++/14 -cxx-isystem /opt/homebrew/Cellar/gcc/14.1.0_1/include/c++/14/aarch64-apple-darwin23"
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libstdc++ -L /opt/homebrew/Cellar/gcc/14.1.0_1/lib/gcc/14 -Wl,-rpath,/opt/homebrew/opt/gcc/lib/gcc/current"
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }} -G Ninja
Expand Down
2 changes: 1 addition & 1 deletion scripts/install-blake3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ install_blake3() {

cd BLAKE3-1.5.1/c || error_exit "Failed to navigate to BLAKE3/c directory."

cmake -B build -DCMAKE_C_COMPILER="$C_COMPILER" -G Ninja || error_exit "Failed to run cmake."
cmake -B build -DCMAKE_C_COMPILER="$C_COMPILER" -DCMAKE_BUILD_TYPE=Release -G Ninja || error_exit "Failed to configure CMake."
get_number_of_processors

cmake --build build --config Release --target install -j "$NUMBER_OF_PROCESSORS" || error_exit "Failed to build and install."
Expand Down

0 comments on commit 97d7bab

Please sign in to comment.