Skip to content

Commit

Permalink
ci: split test build from matrix
Browse files Browse the repository at this point in the history
Allow test suite to run if, for example, the C++20 builds are failing but C++11 are fine.
  • Loading branch information
KrystalDelusion committed Feb 8, 2024
1 parent 157a94a commit 533fea6
Showing 1 changed file with 67 additions and 8 deletions.
75 changes: 67 additions & 8 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
- master

jobs:
build-yosys:
name: Build Yosys
test-builds:
name: Compiler testing
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.compiler }}
Expand All @@ -32,11 +32,6 @@ jobs:
# Add os_name
- os: ubuntu-20.04
os_name: focal
# Build for testing
- os: ubuntu-20.04
os_name: focal
compiler: 'clang'
cpp_std: 'c++11'
# macOS build
- os: macos-13
compiler: 'clang'
Expand Down Expand Up @@ -113,7 +108,71 @@ jobs:
- name: Checkout Yosys
uses: actions/checkout@v4

- name: Build yosys out-of-tree
- name: Build
shell: bash
run: |
make config-${CC%%-*}
make -j$procs CXXSTD=$CXXSTD CC=$CC CXX=$CXX LD=$CC
build-yosys:
name: Reusable Yosys build
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler }}
CXXSTD: ${{ matrix.cpp_std }}
strategy:
matrix:
os:
- ubuntu-20.04
compiler:
- 'clang'
cpp_std:
- 'c++11'
include:
# Add os_name
- os: ubuntu-20.04
os_name: focal
fail-fast: false
steps:
- name: Install Linux Dependencies
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt-get update
sudo apt-get install gperf build-essential bison flex libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot pkg-config python python3 libboost-system-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev
- name: Install macOS Dependencies
if: runner.os == 'macOS'
run: |
brew install bison flex gawk libffi pkg-config bash
- name: Linux runtime environment
if: runner.os == 'Linux'
shell: bash
run: |
echo "${{ github.workspace }}/.local/bin" >> $GITHUB_PATH
echo "procs=$(nproc)" >> $GITHUB_ENV
- name: macOS runtime environment
if: runner.os == 'macOS'
shell: bash
run: |
echo "${{ github.workspace }}/.local/bin" >> $GITHUB_PATH
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
echo "$(brew --prefix flex)/bin" >> $GITHUB_PATH
echo "procs=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
- name: Tool versions
shell: bash
run: |
$CC --version
$CXX --version
- name: Checkout Yosys
uses: actions/checkout@v4

- name: Build
shell: bash
run: |
mkdir build
Expand Down

0 comments on commit 533fea6

Please sign in to comment.