CI Improvements #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compiler testing | |
on: [push, pull_request] | |
jobs: | |
test-compile: | |
runs-on: ${{ matrix.os }} | |
env: | |
CXXFLAGS: ${{ startsWith(matrix.compiler, 'gcc') && '-Wp,-D_GLIBCXX_ASSERTIONS' || ''}} | |
CC_SHORT: ${{ startsWith(matrix.compiler, 'gcc') && 'gcc' || 'clang' }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
compiler: | |
# oldest supported | |
- 'clang-14' | |
- 'gcc-10' | |
# newest | |
- 'clang' | |
- 'gcc' | |
include: | |
# macOS | |
- os: macos-13 | |
compiler: 'clang' | |
# oldest clang not available on ubuntu-latest | |
- os: ubuntu-22.04 | |
compiler: 'clang-11' | |
fail-fast: false | |
steps: | |
- name: Checkout Yosys | |
uses: actions/checkout@v4 | |
- name: Setup environment | |
uses: ./.github/actions/setup-build-env | |
- name: Setup Cpp | |
uses: aminya/setup-cpp@v1 | |
with: | |
compiler: ${{ matrix.compiler }} | |
- name: Tool versions | |
shell: bash | |
run: | | |
$CC --version | |
$CXX --version | |
# minimum standard | |
- name: Build C++11 | |
shell: bash | |
run: | | |
make config-$CC_SHORT | |
make -j$procs CXXSTD=c++11 compile-only | |
# maximum standard, only on newest compilers | |
- name: Build C++20 | |
if: ${{ matrix.compiler == 'clang' || matrix.compiler == 'gcc'}} | |
shell: bash | |
run: | | |
make config-$CC_SHORT | |
make -j$procs CXXSTD=c++20 compile-only |