Skip to content

Commit

Permalink
ci: simplify tests a bit
Browse files Browse the repository at this point in the history
Remove compiler and cpp_std from `build-yosys` matrix.  Using `config-$CC` will instead fall back to default values.

Drop `Tool versions` step and introduce `yosys-config` output instead.

Rename `test-builds` to `test-compile`.
  • Loading branch information
KrystalDelusion committed Feb 9, 2024
1 parent 1632bee commit b256547
Showing 1 changed file with 10 additions and 24 deletions.
34 changes: 10 additions & 24 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- master

jobs:
test-builds:
test-compile:
name: Compiler testing
runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -119,24 +119,13 @@ jobs:
./yosys-config || true
build-yosys:
name: Reusable Yosys build
name: Reusable build
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler }}
CXXSTD: ${{ matrix.cpp_std }}
CC: clang
strategy:
matrix:
os:
- ubuntu-20.04
compiler:
- 'clang'
cpp_std:
- 'c++11'
include:
# Add os_name
- os: ubuntu-20.04
os_name: focal
os: [ubuntu-20.04]
fail-fast: false
steps:
- name: Install Linux Dependencies
Expand Down Expand Up @@ -167,12 +156,6 @@ jobs:
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

Expand All @@ -181,8 +164,12 @@ jobs:
run: |
mkdir build
cd build
make -f ../Makefile config-${CC%%-*}
make -f ../Makefile -j$procs CXXSTD=$CXXSTD CC=$CC CXX=$CXX LD=$CC
make -f ../Makefile config-$CC
make -f ../Makefile -j$procs
- name: Log yosys-config output
run: |
./yosys-config || true
- name: Compress build
shell: bash
Expand All @@ -191,7 +178,6 @@ jobs:
tar -cvf ../build.tar share/ yosys yosys-*
- name: Store build artifact
if: (matrix.cpp_std == 'c++11') && (matrix.compiler == 'clang')
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os }}
Expand Down

0 comments on commit b256547

Please sign in to comment.