Skip to content

Commit

Permalink
ci: Reduce number of jobs
Browse files Browse the repository at this point in the history
Limit compilers to oldest and newest.
Oldest compilers test with minimum supported standard.
Newest compilers test with minimum *and* maximum supported standard.
  • Loading branch information
KrystalDelusion committed Apr 29, 2024
1 parent 77d604f commit b7f2e00
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 48 deletions.
66 changes: 18 additions & 48 deletions .github/workflows/test-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,61 +6,26 @@ jobs:
test-compile:
runs-on: ${{ matrix.os }}
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'
- os: macos-13
compiler: 'clang'
cpp_std: 'c++11'
# macOS
- 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
Expand All @@ -80,12 +45,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
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,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
Expand Down

0 comments on commit b7f2e00

Please sign in to comment.