Skip to content

Commit 3fb35eb

Browse files
committed
Use compiler action
1 parent 02acb0f commit 3fb35eb

1 file changed

Lines changed: 4 additions & 21 deletions

File tree

‎.github/workflows/linux.yml‎

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,10 @@ jobs:
2828
- { compiler: 'clang', version: '18', flags: 'avx512' }
2929
steps:
3030
- name: Setup compiler
31-
if: ${{ matrix.sys.compiler == 'gcc' }}
32-
run: |
33-
GCC_VERSION=${{ matrix.sys.version }}
34-
sudo apt-get update
35-
sudo apt-get --no-install-suggests --no-install-recommends install g++-$GCC_VERSION
36-
CC=gcc-$GCC_VERSION
37-
echo "CC=$CC" >> $GITHUB_ENV
38-
CXX=g++-$GCC_VERSION
39-
echo "CXX=$CXX" >> $GITHUB_ENV
40-
- name: Setup compiler
41-
if: ${{ matrix.sys.compiler == 'clang' }}
42-
run: |
43-
LLVM_VERSION=${{ matrix.sys.version }}
44-
sudo apt-get update || exit 1
45-
sudo apt-get --no-install-suggests --no-install-recommends install clang-$LLVM_VERSION || exit 1
46-
sudo apt-get --no-install-suggests --no-install-recommends install g++ g++-multilib || exit 1
47-
sudo ln -s /usr/include/asm-generic /usr/include/asm
48-
CC=clang-$LLVM_VERSION
49-
echo "CC=$CC" >> $GITHUB_ENV
50-
CXX=clang++-$LLVM_VERSION
51-
echo "CXX=$CXX" >> $GITHUB_ENV
31+
uses: xtensor-stack/xsimd/.github/actions/setup-compiler-apt@main
32+
with:
33+
compiler: ${{ matrix.sys.compiler }}
34+
version: ${{ matrix.sys.version }}
5235
- name: Checkout xsimd-algorithm
5336
uses: actions/checkout@v7
5437
- name: Set conda environment

0 commit comments

Comments
 (0)