Skip to content

Commit

Permalink
ci: use new versions of gcc + clang (#48)
Browse files Browse the repository at this point in the history
* ci: use new versions of gcc + clang

* Bump circleci compiler versions

* Update circleci config.yml

* Try not to stall on tzdata

* Adjust compilers for circleci
  • Loading branch information
james-d-mitchell authored Jan 30, 2025
1 parent 59a3640 commit b899c93
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 39 deletions.
42 changes: 14 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ jobs:
version:
type: string
docker:
- image: reiniscirpons/hpcombi-env-arm64v8:v1
- image: arm64v8/ubuntu:latest
resource_class: arm.medium
steps:
- run:
name: Install dependencies
command: |
apt-get --yes update
apt-get install --yes build-essential libbenchmark-dev make cmake pkg-config git catch2
- run:
name: "Set up compiler"
environment:
Expand All @@ -27,6 +32,7 @@ jobs:
echo "export CC=gcc-$COMPILER_VERSION" >> workspace/new-env-vars
echo "export CXX=g++-$COMPILER_VERSION" >> workspace/new-env-vars
else
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
apt-get install --yes clang++-$COMPILER_VERSION
echo "export CC=clang-$COMPILER_VERSION" >> workspace/new-env-vars
echo "export CXX=clang++-$COMPILER_VERSION" >> workspace/new-env-vars
Expand Down Expand Up @@ -72,35 +78,15 @@ workflows:
name: "test-gcc-9"
compiler: "gcc"
version: "9"
# - test:
# name: "test-gcc-10"
# compiler: "gcc"
# version: "10"
# - test:
# name: "test-gcc-11"
# compiler: "gcc"
# version: "11"
- test:
name: "test-gcc-12"
compiler: "gcc"
version: "12"
name: "test-gcc-14"
compiler: "gcc"
version: "14"
- test:
name: "test-clang-11"
name: "test-clang-14"
compiler: "clang"
version: "11"
# - test:
# name: "test-clang-12"
# compiler: "clang"
# version: "12"
# - test:
# name: "test-clang-13"
# compiler: "clang"
# version: "13"
# - test:
# name: "test-clang-14"
# compiler: "clang"
# version: "14"
version: "14"
- test:
name: "test-clang-15"
name: "test-clang-17"
compiler: "clang"
version: "15"
version: "17"
42 changes: 31 additions & 11 deletions .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ concurrency:

jobs:
tests:
name: "ubuntu-22.04"
name: "ubuntu-latest"
timeout-minutes: 60
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -18,16 +18,21 @@ jobs:
- { compiler: 'gcc', version: '10'}
- { compiler: 'gcc', version: '11'}
- { compiler: 'gcc', version: '12'}
- { compiler: 'clang', version: '11'}
- { compiler: 'clang', version: '12'}
- { compiler: 'clang', version: '13'}
- { compiler: 'gcc', version: '13'}
- { compiler: 'gcc', version: '14'}
- { compiler: 'clang', version: '14'}
- { compiler: 'clang', version: '15'}
- { compiler: 'clang', version: '16'}
- { compiler: 'clang', version: '17'}
- { compiler: 'clang', version: '18'}
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: "Checkout HPCombi repo . . ."
uses: actions/checkout@v3
- name: "Setup compiler . . ."
if: ${{ matrix.sys.compiler == 'gcc' }}
- name: "Setup compiler (gcc, version >= 12) . . ."
if: ${{ matrix.sys.compiler == 'gcc' && fromJSON(matrix.sys.version) >= fromJSON('12')}}
run: |
GCC_VERSION=${{ matrix.sys.version }}
sudo apt-get --yes update
Expand All @@ -36,8 +41,17 @@ jobs:
echo "CC=$CC" >> $GITHUB_ENV
CXX=g++-$GCC_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
- name: "Setup compiler . . ."
if: ${{ matrix.sys.compiler == 'clang' }}
- name: "Setup compiler (gcc, version < 12) . . ."
if: ${{ matrix.sys.compiler == 'gcc' && fromJSON(matrix.sys.version) < fromJSON('12')}}
run: |
GCC_VERSION=${{ matrix.sys.version }}
brew install gcc@$GCC_VERSION
CC=gcc-$GCC_VERSION
echo "CC=$CC" >> $GITHUB_ENV
CXX=g++-$GCC_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
- name: "Setup compiler (clang, version >= 16) . . ."
if: ${{ matrix.sys.compiler == 'clang' && fromJSON(matrix.sys.version) >= fromJSON('16')}}
run: |
LLVM_VERSION=${{ matrix.sys.version }}
sudo apt-get --yes update
Expand All @@ -46,9 +60,15 @@ jobs:
echo "CC=$CC" >> $GITHUB_ENV
CXX=clang++-$LLVM_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
- name: "Install dependencies . . ."
- name: "Setup compiler (clang, version < 16) . . ."
if: ${{ matrix.sys.compiler == 'clang' && fromJSON(matrix.sys.version) < fromJSON('16')}}
run: |
sudo apt-get install --yes ccache
LLVM_VERSION=${{ matrix.sys.version }}
brew install llvm@$LLVM_VERSION
CC="/home/linuxbrew/.linuxbrew/opt/llvm@$LLVM_VERSION/bin/clang"
echo "CC=$CC" >> $GITHUB_ENV
CXX="/home/linuxbrew/.linuxbrew/opt/llvm@$LLVM_VERSION/bin/clang++"
echo "CXX=$CXX" >> $GITHUB_ENV
- name: "Configure the HPCombi build . . ."
env:
CC: ${{ env.CC }}
Expand Down

0 comments on commit b899c93

Please sign in to comment.