mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
ci: split test build from matrix
Allow test suite to run if, for example, the C++20 builds are failing but C++11 are fine.
This commit is contained in:
parent
f408b4de05
commit
8bc206928f
75
.github/workflows/test-build.yml
vendored
75
.github/workflows/test-build.yml
vendored
|
@ -23,8 +23,8 @@ jobs:
|
||||||
# only run on push *or* pull_request, not both
|
# only run on push *or* pull_request, not both
|
||||||
concurrent_skipping: 'same_content_newer'
|
concurrent_skipping: 'same_content_newer'
|
||||||
|
|
||||||
build-yosys:
|
test-builds:
|
||||||
name: Build Yosys
|
name: Compiler testing
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
needs: pre_job
|
needs: pre_job
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
if: needs.pre_job.outputs.should_skip != 'true'
|
||||||
|
@ -48,11 +48,6 @@ jobs:
|
||||||
# Add os_name
|
# Add os_name
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
os_name: focal
|
os_name: focal
|
||||||
# Build for testing
|
|
||||||
- os: ubuntu-20.04
|
|
||||||
os_name: focal
|
|
||||||
compiler: 'clang'
|
|
||||||
cpp_std: 'c++11'
|
|
||||||
# macOS build
|
# macOS build
|
||||||
- os: macos-13
|
- os: macos-13
|
||||||
compiler: 'clang'
|
compiler: 'clang'
|
||||||
|
@ -131,7 +126,71 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- 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
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
|
|
Loading…
Reference in a new issue