Modernize linux CI
- Test Ubuntu-22.04 - Use ccache - Ensure backwards compatibility with Ubuntu-20.04
This commit is contained in:
parent
4aa56496d6
commit
29b87a4e69
73
.github/workflows/continuous_integration.yml
vendored
73
.github/workflows/continuous_integration.yml
vendored
@ -16,22 +16,22 @@ permissions: read-all
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux:
|
linux:
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04]
|
|
||||||
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
|
compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}]
|
||||||
cmake_build_type: [Debug, Release]
|
cmake_build_type: [Debug, Release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2
|
- uses: lukka/get-cmake@latest
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
- name: Install Ubuntu Package Dependencies
|
- name: Setup ccache
|
||||||
run: |
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
sudo apt-get -qq update
|
with:
|
||||||
sudo apt-get install -y clang-6.0
|
key: ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}}
|
||||||
- name: Install GoogleTest
|
- name: Install GoogleTest
|
||||||
run: |
|
run: |
|
||||||
# check out pre-breakage version of googletest; can be deleted when
|
# check out pre-breakage version of googletest; can be deleted when
|
||||||
@ -45,16 +45,61 @@ jobs:
|
|||||||
git reset --hard FETCH_HEAD
|
git reset --hard FETCH_HEAD
|
||||||
cd ../..
|
cd ../..
|
||||||
- name: Update Glslang Sources
|
- name: Update Glslang Sources
|
||||||
run: |
|
run: ./update_glslang_sources.py
|
||||||
./update_glslang_sources.py
|
- name: Configure
|
||||||
- name: Build
|
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
|
||||||
env:
|
env:
|
||||||
CC: ${{matrix.compiler.cc}}
|
CC: ${{matrix.compiler.cc}}
|
||||||
CXX: ${{matrix.compiler.cxx}}
|
CXX: ${{matrix.compiler.cxx}}
|
||||||
|
CMAKE_GENERATOR: Ninja
|
||||||
|
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||||
|
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build
|
||||||
|
- name: Install
|
||||||
|
run: cmake --install build --prefix build/install
|
||||||
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
mkdir build && cd build
|
cd build
|
||||||
cmake -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DCMAKE_INSTALL_PREFIX=`pwd`/install ..
|
ctest --output-on-failure &&
|
||||||
make -j4 install
|
cd ../Test && ./runtests
|
||||||
|
|
||||||
|
# Ensure we can compile/run on an older distro
|
||||||
|
linux_min:
|
||||||
|
name: Linux Backcompat
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.7'
|
||||||
|
- name: Setup ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
|
with:
|
||||||
|
key: linux_backcompat
|
||||||
|
- name: Install GoogleTest
|
||||||
|
run: |
|
||||||
|
# check out pre-breakage version of googletest; can be deleted when
|
||||||
|
# issue 3128 is fixed
|
||||||
|
# git clone --depth=1 https://github.com/google/googletest.git External/googletest
|
||||||
|
mkdir -p External/googletest
|
||||||
|
cd External/googletest
|
||||||
|
git init
|
||||||
|
git remote add origin https://github.com/google/googletest.git
|
||||||
|
git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
|
||||||
|
git reset --hard FETCH_HEAD
|
||||||
|
cd ../..
|
||||||
|
- name: Update Glslang Sources
|
||||||
|
run: ./update_glslang_sources.py
|
||||||
|
- name: Configure
|
||||||
|
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
|
||||||
|
env:
|
||||||
|
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||||
|
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build
|
||||||
|
- name: Install
|
||||||
|
run: cmake --install build --prefix build/install
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user