Skip to content

Commit

Permalink
Reverting to GCC for MacOS IV
Browse files Browse the repository at this point in the history
  • Loading branch information
ibarrond committed Sep 20, 2023
1 parent b1a8d1b commit 9993ef3
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/pytest-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,27 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
- name: (MacOs only) Install GNU GCC. Keep track of the path to the installed version
- name: (MacOs only) Install GNU GCC.
if: matrix.os == 'macos-latest'
run: |
brew install gcc libomp
: # Brew installs GCC in /opt/homebrew/bin on Apple Silicon and /usr/local/bin on Intel.
: # Check system name to determine path to GCC
- name: (MacOs only) Set CC/CXX environment variables to GNU GCC
if: matrix.os == 'macos-latest'
run: |
: #--> CHECK SYSTEM NAME AND SET BREW_GCC_PATH
: #--> Brew installs GCC in /opt/homebrew/bin on Apple Silicon and /usr/local/bin on Intel.
if [ $(uname -m)='arm64' ]
then
echo "BREW_GCC_PATH=/opt/homebrew/bin" >> $GITHUB_ENV
else
echo "BREW_GCC_PATH=/usr/local/bin" >> $GITHUB_ENV
fi
echo "GCC installed at $BREW_GCC_PATH"
- name: (MacOs only) Set CC/CXX environment variables to GNU GCC
if: matrix.os == 'macos-latest'
run: |
echo "CC=$BREW_GCC_PATH/$(ls BREW_GCC_PATH | grep ^gcc-[0-9]+ | sort -V -r | head -n 1)" >> $GITHUB_ENV
echo "CXX=$BREW_GCC_PATH/$(ls BREW_GCC_PATH | grep ^gcc-[0-9]+ | sort -V -r | head -n 1)" >> $GITHUB_ENV
echo "CC set to $CC"
echo "CXX set to $CXX"
echo "GCC installed at ${{ env.BREW_GCC_PATH }}"
: #--> SET CC/CXX ENVIRONMENT VARIABLES
echo "CC=${{ env.BREW_GCC_PATH }}/$(ls ${{ env.BREW_GCC_PATH }} | grep ^gcc-[0-9]+ | sort -V -r | head -n 1)" >> $GITHUB_ENV
echo "CXX=${{ env.BREW_GCC_PATH }}/$(ls ${{ env.BREW_GCC_PATH }} | grep ^g++-[0-9]+ | sort -V -r | head -n 1)" >> $GITHUB_ENV
echo "CC set to ${{ env.CC }}"
echo "CXX set to ${{ env.CXX }}"
# echo "gcc=$BREW_GCC_PATH/$(ls BREW_GCC_PATH | grep ^gcc-[0-9]+ | sort -V -r | head -n 1)" >> $GITHUB_ENV
# echo "gxx=/usr/local/bin/$(ls /usr/local/bin | grep ^g++-[0-9]+ | sort -V -r | head -n 1)" >> $GITHUB_ENV
# - name: (MacOs only) Install Clang
Expand Down

0 comments on commit 9993ef3

Please sign in to comment.