ci: Reduce number of jobs

Limit compilers to oldest and newest.
Oldest compilers test with minimum supported standard.
Newest compilers test with minimum *and* maximum supported standard.
This commit is contained in:
Krystine Sherwin 2024-04-30 11:11:46 +12:00
parent 24b3690c25
commit 6908330005
No known key found for this signature in database
2 changed files with 24 additions and 48 deletions

View File

@ -22,61 +22,26 @@ jobs:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
env:
CXXSTD: ${{ matrix.cpp_std }}
CXXFLAGS: ${{ startsWith(matrix.compiler, 'gcc') && '-Wp,-D_GLIBCXX_ASSERTIONS' || ''}}
CC_SHORT: ${{ startsWith(matrix.compiler, 'gcc') && 'gcc' || 'clang' }}
strategy:
matrix:
os:
- ubuntu-22.04
- ubuntu-latest
compiler:
- 'clang-12'
- 'gcc-11'
cpp_std:
- 'c++11'
- 'c++14'
- 'c++17'
- 'c++20'
# oldest supported
- 'clang-14'
- 'gcc-10'
# newest
- 'clang'
- 'gcc'
include:
# macOS builds
- os: macos-latest
compiler: 'clang'
cpp_std: 'c++11'
# macOS
- os: macos-13
compiler: 'clang'
cpp_std: 'c++11'
- os: macos-13
compiler: 'clang'
cpp_std: 'c++17'
# ubuntu-22.04 compilers
# oldest clang not available on ubuntu-latest
- os: ubuntu-22.04
compiler: 'clang-11'
cpp_std: 'c++11'
- os: ubuntu-22.04
compiler: 'clang-13'
cpp_std: 'c++11'
# ubuntu-latest compilers
- os: ubuntu-latest
compiler: 'clang-14'
cpp_std: 'c++11'
- os: ubuntu-latest
compiler: 'clang-15'
cpp_std: 'c++11'
- os: ubuntu-latest
compiler: 'clang-16'
cpp_std: 'c++11'
- os: ubuntu-latest
compiler: 'clang-17'
cpp_std: 'c++11'
- os: ubuntu-latest
compiler: 'gcc-10'
cpp_std: 'c++11'
- os: ubuntu-latest
compiler: 'gcc-12'
cpp_std: 'c++11'
- os: ubuntu-latest
compiler: 'gcc-13'
cpp_std: 'c++11'
fail-fast: false
steps:
- name: Checkout Yosys
@ -96,12 +61,17 @@ jobs:
$CC --version
$CXX --version
- name: Build
# minimum standard
- name: Build C++11
shell: bash
run: |
make config-$CC_SHORT
make -j$procs CXXSTD=$CXXSTD
make -j$procs CXXSTD=c++11 compile-only
- name: Log yosys-config output
# maximum standard, only on newest compilers
- name: Build C++20
if: ${{ matrix.compiler == 'clang' || matrix.compiler == 'gcc'}}
shell: bash
run: |
./yosys-config || true
make config-$CC_SHORT
make -j$procs CXXSTD=c++20 compile-only

View File

@ -727,6 +727,12 @@ top-all: $(TARGETS) $(EXTRA_TARGETS)
@echo " Build successful."
@echo ""
.PHONY: compile-only
compile-only: $(OBJS)
@echo ""
@echo " Compile successful."
@echo ""
ifeq ($(CONFIG),emcc)
yosys.js: $(filter-out yosysjs-$(YOSYS_VER).zip,$(EXTRA_TARGETS))
endif