3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 01:54:10 +00:00

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 needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true' if: needs.pre_job.outputs.should_skip != 'true'
env: env:
CXXSTD: ${{ matrix.cpp_std }}
CXXFLAGS: ${{ startsWith(matrix.compiler, 'gcc') && '-Wp,-D_GLIBCXX_ASSERTIONS' || ''}} CXXFLAGS: ${{ startsWith(matrix.compiler, 'gcc') && '-Wp,-D_GLIBCXX_ASSERTIONS' || ''}}
CC_SHORT: ${{ startsWith(matrix.compiler, 'gcc') && 'gcc' || 'clang' }} CC_SHORT: ${{ startsWith(matrix.compiler, 'gcc') && 'gcc' || 'clang' }}
strategy: strategy:
matrix: matrix:
os: os:
- ubuntu-22.04 - ubuntu-latest
compiler: compiler:
- 'clang-12' # oldest supported
- 'gcc-11' - 'clang-14'
cpp_std: - 'gcc-10'
- 'c++11' # newest
- 'c++14' - 'clang'
- 'c++17' - 'gcc'
- 'c++20'
include: include:
# macOS builds # macOS
- os: macos-latest
compiler: 'clang'
cpp_std: 'c++11'
- os: macos-13 - os: macos-13
compiler: 'clang' compiler: 'clang'
cpp_std: 'c++11' # oldest clang not available on ubuntu-latest
- os: macos-13
compiler: 'clang'
cpp_std: 'c++17'
# ubuntu-22.04 compilers
- os: ubuntu-22.04 - os: ubuntu-22.04
compiler: 'clang-11' 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 fail-fast: false
steps: steps:
- name: Checkout Yosys - name: Checkout Yosys
@ -96,12 +61,17 @@ jobs:
$CC --version $CC --version
$CXX --version $CXX --version
- name: Build # minimum standard
- name: Build C++11
shell: bash shell: bash
run: | run: |
make config-$CC_SHORT 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: | 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 " Build successful."
@echo "" @echo ""
.PHONY: compile-only
compile-only: $(OBJS)
@echo ""
@echo " Compile successful."
@echo ""
ifeq ($(CONFIG),emcc) ifeq ($(CONFIG),emcc)
yosys.js: $(filter-out yosysjs-$(YOSYS_VER).zip,$(EXTRA_TARGETS)) yosys.js: $(filter-out yosysjs-$(YOSYS_VER).zip,$(EXTRA_TARGETS))
endif endif