Skip to content

Commit

Permalink
ci: Use aminya/setup-cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
KrystalDelusion committed Mar 3, 2024
1 parent d6f9619 commit e5fff36
Showing 1 changed file with 5 additions and 25 deletions.
30 changes: 5 additions & 25 deletions .github/workflows/test-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ jobs:
test-compile:
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler }}
CXXSTD: ${{ matrix.cpp_std }}
CXXFLAGS: ${{ startsWith(matrix.compiler, 'gcc') && '-Wp,-D_GLIBCXX_ASSERTIONS' || ''}}
strategy:
matrix:
os:
Expand Down Expand Up @@ -61,29 +60,10 @@ jobs:
run: |
brew install bison flex gawk libffi pkg-config bash
- name: Setup GCC
if: startsWith(matrix.compiler, 'gcc')
shell: bash
run: |
CXX=${CC/#gcc/g++}
sudo apt-add-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install $CC $CXX
echo "CXX=$CXX" >> $GITHUB_ENV
echo "CXXFLAGS=-Wp,-D_GLIBCXX_ASSERTIONS" >> $GITHUB_ENV
- name: Setup Clang
if: startsWith(matrix.compiler, 'clang') && (matrix.compiler != 'clang')
shell: bash
run: |
wget https://apt.llvm.org/llvm-snapshot.gpg.key
sudo apt-key add llvm-snapshot.gpg.key
rm llvm-snapshot.gpg.key
sudo apt-add-repository "deb https://apt.llvm.org/${{ matrix.os_name }}/ llvm-toolchain-${{ matrix.os_name }} main"
sudo apt-get update
CXX=${CC/#clang/clang++}
sudo apt-get install $CC $CXX
echo "CXX=$CXX" >> $GITHUB_ENV
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.compiler }}

- name: Linux runtime environment
if: runner.os == 'Linux'
Expand Down

0 comments on commit e5fff36

Please sign in to comment.