Skip to content

Commit

Permalink
Update GHA & build script: indiv. settings for each platform
Browse files Browse the repository at this point in the history
  • Loading branch information
ibressler committed Jun 20, 2024
1 parent a8ab364 commit 3978433
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
- name: Checking out the repo
uses: actions/checkout@v4

## Windows ##

- name: Setup MSYS2 in Windows
if: ${{ startsWith(matrix.os, 'windows') }}
uses: msys2/setup-msys2@v2
Expand All @@ -37,14 +39,27 @@ jobs:
(cd "$(dirname "$(which clang)")" && ln -s clang gcc && ln -s clang++ g++)
sh build.sh
## Linux/Ubuntu ##

- name: Show info on Ubuntu
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: dpkg -l | grep -E ' gcc| clang'

- name: Building non-MSYS2
if: ${{ ! startsWith(matrix.os, 'windows') }}
- name: Building in Linux
if: ${{ startsWith(matrix.os, 'ubuntu') }}
env:
CC: clang-15
CXX: clang-15++
run: sh build.sh

## macOS ##

- name: Building in macOS
if: ${{ startsWith(matrix.os, 'macos') }}
run: sh build.sh

## General ##

- name: Upload log for debugging configure step
if: always()
uses: actions/upload-artifact@v4
Expand Down
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ case "$(echo $plat | cut -d_ -f1)" in
MINGW64) plat=windows;conf=win/configure;;
esac

[ -z "$CC" ] || "Using CC=$CC"
[ -z "$CXX" ] || "Using CC=$CXX"

# path of this script
scriptdir="$(cd "$(dirname "$0")" && pwd -P)"
# output dir
Expand Down

0 comments on commit 3978433

Please sign in to comment.