Skip to content

Commit

Permalink
Refactor CI (no more gcc 7)
Browse files Browse the repository at this point in the history
  • Loading branch information
dellaert committed Feb 5, 2023
1 parent 4461efc commit 42182c8
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 80 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,15 @@ jobs:
# Github Actions requires a single row to be added to the build matrix.
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
name: [
ubuntu-20.04-gcc-7,
ubuntu-20.04-gcc-9,
ubuntu-20.04-clang-9,
ubuntu-22.04-gcc-11,
ubuntu-22.04-clang-14,
]

build_type: [Debug, Release]
build_unstable: [ON]
include:
- name: ubuntu-20.04-gcc-7
os: ubuntu-20.04
compiler: gcc
version: "7"

- name: ubuntu-20.04-gcc-9
os: ubuntu-20.04
compiler: gcc
Expand All @@ -43,6 +39,16 @@ jobs:
compiler: clang
version: "9"

- name: ubuntu-22.04-gcc-11
os: ubuntu-22.04
compiler: gcc
version: "11"

- name: ubuntu-22.04-clang-14
os: ubuntu-22.04
compiler: clang
version: "14"

steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,8 @@ jobs:
run: |
brew install cmake ninja
brew install boost
if [ "${{ matrix.compiler }}" = "gcc" ]; then
brew install gcc@${{ matrix.version }}
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
else
sudo xcode-select -switch /Applications/Xcode.app
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
fi
sudo xcode-select -switch /Applications/Xcode.app
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Build and Test
run: bash .github/scripts/unix.sh -t
20 changes: 4 additions & 16 deletions .github/workflows/build-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,26 @@ jobs:
# Github Actions requires a single row to be added to the build matrix.
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
name: [
ubuntu-20.04-gcc-7,
ubuntu-20.04-gcc-9,
ubuntu-20.04-gcc-9-tbb,
ubuntu-20.04-clang-9,
macOS-11-xcode-13.4.1,
ubuntu-20.04-gcc-7-tbb,
]

build_type: [Debug, Release]
python_version: [3]
include:
- name: ubuntu-20.04-gcc-7
os: ubuntu-20.04
compiler: gcc
version: "7"

- name: ubuntu-20.04-gcc-9
os: ubuntu-20.04
compiler: gcc
version: "9"

- name: ubuntu-20.04-clang-9
- name: ubuntu-20.04-gcc-9-tbb
os: ubuntu-20.04
compiler: clang
compiler: gcc
version: "9"
flag: tbb

# NOTE temporarily added this as it is a required check.
- name: ubuntu-20.04-clang-9
os: ubuntu-20.04
compiler: clang
Expand All @@ -57,12 +51,6 @@ jobs:
compiler: xcode
version: "13.4.1"

- name: ubuntu-20.04-gcc-7-tbb
os: ubuntu-20.04
compiler: gcc
version: "7"
flag: tbb

steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
80 changes: 31 additions & 49 deletions .github/workflows/build-special.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,45 @@ jobs:
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
name:
[
ubuntu-gcc-deprecated,
ubuntu-gcc-quaternions,
ubuntu-gcc-tbb,
ubuntu-cayleymap,
ubuntu-clang-deprecated,
ubuntu-clang-quaternions,
ubuntu-clang-tbb,
ubuntu-clang-cayleymap,
ubuntu-clang-system-libs,
]

build_type: [Debug, Release]

include:
- name: ubuntu-gcc-deprecated
- name: ubuntu-clang-deprecated
os: ubuntu-20.04
compiler: gcc
version: "9"
compiler: clang
version: "14"
flag: deprecated

- name: ubuntu-gcc-quaternions
os: ubuntu-20.04
compiler: gcc
version: "9"
- name: ubuntu-clang-quaternions
os: ubuntu-22.04
compiler: clang
version: "14"
flag: quaternions

- name: ubuntu-gcc-tbb
os: ubuntu-20.04
compiler: gcc
version: "9"
- name: ubuntu-clang-tbb
os: ubuntu-22.04
compiler: clang
version: "14"
flag: tbb

- name: ubuntu-cayleymap
os: ubuntu-20.04
compiler: gcc
version: "9"
- name: ubuntu-clang-cayleymap
os: ubuntu-22.04
compiler: clang
version: "14"
flag: cayley

- name: ubuntu-system-libs
os: ubuntu-20.04
compiler: gcc
version: "9"
flag: system-libs
- name: ubuntu-clang-system-libs
os: ubuntu-22.04
compiler: clang
version: "14"
flag: system

steps:
- name: Checkout
Expand All @@ -68,25 +69,12 @@ jobs:
- name: Install (Linux)
if: runner.os == 'Linux'
run: |
# LLVM 9 is not in Bionic's repositories so we add the official LLVM repository.
if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.version }}" = "9" ]; then
gpg --keyserver keyserver.ubuntu.com --recv-key $LLVM_KEY || gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-key $LLVM_KEY
gpg -a --export 15CF4D18AF4F7421 | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
fi
sudo apt-get -y update
sudo apt-get -y install cmake build-essential pkg-config libpython3-dev python3-numpy libicu-dev
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
else
sudo apt-get install -y clang-${{ matrix.version }} g++-multilib
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
sudo apt-get install -y clang-${{ matrix.version }} g++-multilib
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
- name: Install Boost
if: runner.os == 'Linux'
Expand All @@ -97,15 +85,9 @@ jobs:
if: runner.os == 'macOS'
run: |
brew install cmake ninja boost
if [ "${{ matrix.compiler }}" = "gcc" ]; then
brew install gcc@${{ matrix.version }}
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
else
sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
fi
sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Set Allow Deprecated Flag
if: matrix.flag == 'deprecated'
Expand Down

0 comments on commit 42182c8

Please sign in to comment.