Skip to content

Commit

Permalink
Github actions: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joto committed Dec 21, 2022
1 parent f0a4609 commit c423319
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 116 deletions.
10 changes: 5 additions & 5 deletions .github/actions/build-sub/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build subprojects

runs:
using: composite
steps:
- name: Build
run: ./cmake/build_subprojects.sh ${BUILD_TYPE}
shell: bash
using: composite
steps:
- name: Build
run: ./cmake/build_subprojects.sh ${BUILD_TYPE}
shell: bash

12 changes: 6 additions & 6 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Build

runs:
using: composite
steps:
- name: Build
run: make VERBOSE=1
shell: bash
working-directory: build
using: composite
steps:
- name: Build
run: make VERBOSE=1
shell: bash
working-directory: build

22 changes: 12 additions & 10 deletions .github/actions/cmake/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: CMake

runs:
using: composite
steps:
- name: Create build directory
run: mkdir build
shell: bash
- name: Configure
run: |
cmake -LA .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
shell: bash
working-directory: build
using: composite
steps:
- name: Create build directory
run: mkdir build
shell: bash
- name: Configure
run: |
cmake -LA .. \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE}
shell: bash
working-directory: build

12 changes: 6 additions & 6 deletions .github/actions/ctest/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: ctest

runs:
using: composite
steps:
- name: Test
run: ctest --output-on-failure
shell: bash
working-directory: build
using: composite
steps:
- name: Test
run: ctest --output-on-failure
shell: bash
working-directory: build

15 changes: 7 additions & 8 deletions .github/actions/install-ubuntu/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ name: Install Prerequisites on Ubuntu

runs:
using: composite

steps:
- name: Install packages
run: |
sudo apt-get update -q
sudo apt-get update -qq
sudo apt-get install -yq \
libboost-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libgdal-dev \
libproj-dev \
libsparsehash-dev
libboost-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libgdal-dev \
libproj-dev \
libsparsehash-dev
shell: bash

119 changes: 38 additions & 81 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
name: [Ubuntu-18, Ubuntu-20, Ubuntu-21, Debian-9, Debian-10, Debian-11, Debian-Testing, Debian-Experimental, Fedora-34]
name: [Ubuntu-18, Ubuntu-20, Ubuntu-22, Debian-9, Debian-10, Debian-11, Debian-Testing, Debian-Experimental, Fedora-35, Fedora-36]
build_type: [Dev]
cpp_compiler: [g++]
cpp_version: [c++11]
Expand All @@ -17,121 +17,103 @@ jobs:
# Uses gcc 7.5.0, clang 6.0.0, cmake 3.10.2
image: "ubuntu:18.04"
ubuntu: 18
installer: apt
- name: Ubuntu-20
# Uses gcc 9.3.0, clang 10.0.0, cmake 3.16.3
image: "ubuntu:20.04"
ubuntu: 20
installer: apt
- name: Ubuntu-21
# Uses gcc 10.3.0, clang, 12.0.0, cmake 3.18.4
image: "ubuntu:21.04"
ubuntu: 21
installer: apt
- name: Ubuntu-22
image: "ubuntu:22.04"
ubuntu: 22
- name: Debian-9
# Uses gcc 6.3.0, clang 3.8.1, cmake 3.7.2
image: "debian:stretch"
installer: apt
- name: Debian-10
# Uses gcc 8.3.0, clang 7.0.1, cmake 3.13.4
image: "debian:buster"
installer: apt
- name: Debian-11
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
image: "debian:bullseye"
installer: apt
- name: Debian-11
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
image: "debian:bullseye"
installer: apt
cpp_version: c++17
- name: Debian-11
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
image: "debian:bullseye"
installer: apt
cpp_version: c++20
- name: Debian-11
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
image: "debian:bullseye"
installer: apt
c_compiler: clang
cpp_compiler: clang++
cpp_version: c++17
- name: Debian-11
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
image: "debian:bullseye"
installer: apt
c_compiler: clang
cpp_compiler: clang++
cpp_version: c++20
- name: Debian-11
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
image: "debian:bullseye"
installer: apt
build_type: RelWithDebInfo
- name: Debian-11
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
image: "debian:bullseye"
installer: apt
c_compiler: clang
cpp_compiler: clang++
- name: Debian-11
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
image: "debian:bullseye"
installer: apt
c_compiler: clang
cpp_compiler: clang++
CXXFLAGS: -fsanitize=address,undefined,integer -fno-sanitize-recover=all -fno-omit-frame-pointer
LDFLAGS: -fsanitize=address,undefined,integer
- name: Debian-Testing
# Uses gcc 10.3.0, clang 11.1.0, cmake 3.21.3
image: "debian:testing"
installer: apt
CXXFLAGS: -Wno-stringop-overread
- name: Debian-Testing
# Uses gcc 10.3.0, clang 11.1.0, cmake 3.21.3
image: "debian:testing"
installer: apt
c_compiler: clang
cpp_compiler: clang++
- name: Debian-Experimental
# Uses gcc 11, clang 14, cmake 3.21.3
image: "debian:experimental"
installer: apt
CXXFLAGS: -Wno-stringop-overread
- name: Debian-Experimental
# Uses gcc 11, clang 14, cmake 3.21.3
image: "debian:experimental"
installer: apt
c_compiler: clang-14
cpp_compiler: clang++-14
- name: Fedora-34
# Uses gcc 11.2.1, clang 12.0.1, cmake 3.20.5
image: "fedora:34"
installer: dnf
CXXFLAGS: -Wno-stringop-overread
- name: Fedora-35
# Uses gcc 11.2.1, clang 12.0.1, cmake 3.20.5
image: "fedora:35"
installer: dnf
CXXFLAGS: -Wno-stringop-overread
- name: Fedora-36
# Uses gcc 12.2.0, clang 14.0.5, cmake 3.24.2
image: "fedora:36"
CXXFLAGS: -Wno-stringop-overread
container:
image: ${{ matrix.image }}
env:
LANG: en_US.UTF-8
BUILD_TYPE: ${{ matrix.build_type }}
CXXFLAGS: ${{ matrix.CXXFLAGS }}
LDFLAGS: ${{ matrix.LDFLAGS }}
CC: ${{ matrix.c_compiler }}
CXX: ${{ matrix.cpp_compiler }}
CXXFLAGS: ${{ matrix.CXXFLAGS }}
LDFLAGS: ${{ matrix.LDFLAGS }}
CPP_VERSION: ${{ matrix.cpp_version }}
APT_LISTCHANGES_FRONTEND: none
DEBIAN_FRONTEND: noninteractive
steps:
- name: Prepare container (apt)
shell: bash
if: startsWith(matrix.image, 'debian:') || startsWith(matrix.image, 'ubuntu:')
run: |
apt-get update -qq
apt-get install -y \
apt-get install -yq \
clang \
cmake \
g++ \
Expand All @@ -146,13 +128,13 @@ jobs:
libproj-dev \
make \
zlib1g-dev
shell: bash
if: matrix.installer == 'apt'
- name: Install compiler
shell: bash
run: apt-get install -y clang-14
if: matrix.cpp_compiler == 'clang++-14'
run: apt-get install -yq clang-14
- name: Prepare container (dnf)
shell: bash
if: startsWith(matrix.image, 'fedora:')
run: |
dnf install --quiet --assumeyes \
boost-devel \
Expand All @@ -166,77 +148,52 @@ jobs:
make \
proj-devel \
zlib-devel
shell: bash
if: matrix.installer == 'dnf'
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ./.github/actions/install-from-git
- uses: ./.github/actions/cmake
- uses: ./.github/actions/build
- uses: ./.github/actions/ctest

ubuntu-latest:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
CC: clang-13
CXX: clang++-13
CC: clang-15
CXX: clang++-15
BUILD_TYPE: Dev
steps:
- name: Install new clang
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main'
sudo apt-get update -q
sudo apt-get install -yq clang-13
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/llvm-snapshot.asc
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main'
sudo apt-get update -qq
sudo apt-get install -yq clang-15
shell: bash
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ./.github/actions/install-ubuntu
- uses: ./.github/actions/install-from-git
- uses: ./.github/actions/cmake
- uses: ./.github/actions/build
- uses: ./.github/actions/ctest
- uses: ./.github/actions/build-sub

macos10-dev:
runs-on: macos-10.15
env:
CC: clang
CXX: clang++
CXXFLAGS: -std=c++14
BUILD_TYPE: Dev
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-macos
- uses: ./.github/actions/install-from-git
- uses: ./.github/actions/cmake
- uses: ./.github/actions/build
- uses: ./.github/actions/ctest
- uses: ./.github/actions/build-sub

macos11-dev:
runs-on: macos-11.0
env:
CC: clang
CXX: clang++
CXXFLAGS: -std=c++14
BUILD_TYPE: Dev
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-macos
- uses: ./.github/actions/install-from-git
- uses: ./.github/actions/cmake
- uses: ./.github/actions/build
- uses: ./.github/actions/ctest
- uses: ./.github/actions/build-sub

macos11-release:
runs-on: macos-11.0
macos:
strategy:
fail-fast: false
matrix:
os:
- "macos-11"
build_type: [Dev]
include:
- os: "macos-11"
build_type: Release
runs-on: ${{ matrix.os }}
env:
CC: clang
CXX: clang++
CXXFLAGS: -std=c++14
BUILD_TYPE: Release
BUILD_TYPE: ${{ matrix.build_type }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ./.github/actions/install-macos
- uses: ./.github/actions/install-from-git
- uses: ./.github/actions/cmake
Expand Down

0 comments on commit c423319

Please sign in to comment.