Skip to content

chore: retrigger CI #612

chore: retrigger CI

chore: retrigger CI #612

Workflow file for this run

name: CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
QT_VERSION: '6.6.2'
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install depends
run: >-
sudo apt update &&
sudo apt-get install -y
'^libxcb.*-dev'
catch
libfmt-dev
libgl-dev
libgl1-mesa-dev
libglu1-mesa-dev
libicu-dev
libx11-xcb-dev
libxcb-{icccm4,image0,keysyms1,randr0,render-util0,shape0,sync1,xfixes0,xinerama0,xkb1}
libxi-dev
libxkbcommon-dev
libxkbcommon-x11-0
libxkbcommon-x11-dev
libxrender-dev
linguist-qt6
ninja-build
p7zip-full
python3-py7zr
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
install-deps: 'true'
modules: 'qt5compat'
cache: 'true'
cache-key-prefix: 'install-qt-action'
setup-python: 'true'
tools: 'tools_ifw'
set-env: 'true'
aqtversion: '==3.1.*'
py7zrversion: '==0.20.*'
extra: '--external 7z'
- name: Configure CMake (push - no tests)
if: github.event_name == 'push'
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_UNIT_TEST=OFF -DENABLE_CLANG_TIDY=OFF -DENABLE_DOXYGEN=OFF
- name: Configure CMake (PR - with tests)
if: github.event_name == 'pull_request'
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_CLANG_TIDY=OFF -DENABLE_DOXYGEN=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Build
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: Smoke Test
if: github.event_name == 'push'
run: |
set -e
QSOC=./build/qsoc
TMPD=$(mktemp -d)
trap "rm -rf $TMPD" EXIT
echo "--- version ---"
$QSOC -v
echo "--- help ---"
$QSOC -h | head -3
echo "--- project create ---"
$QSOC project create -d "$TMPD" smoke_test
echo "--- bus import ---"
printf 'Name;Mode;Direction;Width;Qualifier\npclk;slave;in;1;\nprdata;slave;out;32;data\n' > "$TMPD/smoke.csv"
$QSOC bus import -d "$TMPD" -l smoke_lib -b smoke_bus "$TMPD/smoke.csv"
echo "--- module import ---"
printf 'module smoke_mod(input clk, output [7:0] data);\nassign data = 8'\''hFF;\nendmodule\n' > "$TMPD/smoke.v"
$QSOC module import -d "$TMPD" -l smoke_lib "$TMPD/smoke.v"
echo "--- all smoke tests passed ---"
- name: Full Test
if: github.event_name == 'pull_request'
uses: coactions/setup-xvfb@v1
with:
working-directory: build
run: ctest -C ${{env.BUILD_TYPE}} --rerun-failed --output-on-failure
build-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
modules: 'qt5compat'
cache: 'true'
cache-key-prefix: 'install-qt-action-windows'
- name: Install tools
run: choco install ninja pkgconfiglite -y
- name: Configure CMake (push - no tests)
if: github.event_name == 'push'
run: >-
cmake -B build -G Ninja
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DSLANG_USE_MIMALLOC=OFF
-DENABLE_UNIT_TEST=OFF
-DENABLE_CLANG_TIDY=OFF
-DENABLE_DOXYGEN=OFF
- name: Configure CMake (PR - with tests)
if: github.event_name == 'pull_request'
run: >-
cmake -B build -G Ninja
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DSLANG_USE_MIMALLOC=OFF
-DENABLE_CLANG_TIDY=OFF
-DENABLE_DOXYGEN=OFF
- name: Build
run: cmake --build build --config ${{ env.BUILD_TYPE }}
- name: Smoke Test
if: github.event_name == 'push'
run: |
$env:PATH = "$env:QT_ROOT_DIR\bin;$env:PATH"
$QSOC = ".\build\qsoc.exe"
$TMPD = Join-Path $env:TEMP "qsoc_smoke"
New-Item -ItemType Directory -Force -Path $TMPD | Out-Null
try {
Write-Host "--- version ---"
& $QSOC -v
if ($LASTEXITCODE -ne 0) { throw "version failed" }
Write-Host "--- help ---"
& $QSOC -h
Write-Host "--- project create ---"
& $QSOC project create -d $TMPD smoke_test
if ($LASTEXITCODE -ne 0) { throw "project create failed" }
Write-Host "--- bus import ---"
$csvFile = Join-Path $TMPD "smoke.csv"
[IO.File]::WriteAllText($csvFile, "Name;Mode;Direction;Width;Qualifier`npclk;slave;in;1;`nprdata;slave;out;32;data`n")
& $QSOC bus import -d $TMPD -l smoke_lib -b smoke_bus $csvFile
if ($LASTEXITCODE -ne 0) { throw "bus import failed" }
Write-Host "--- module import (skip: slang path backslash issue) ---"
Write-Host "--- all smoke tests passed ---"
} finally {
Remove-Item -Recurse -Force $TMPD -ErrorAction SilentlyContinue
}
- name: Full Test
if: github.event_name == 'pull_request'
run: |
$env:PATH = "$env:QT_ROOT_DIR\bin;$env:PATH"
cd build
ctest -C ${{ env.BUILD_TYPE }} --rerun-failed --output-on-failure -E "test_qsocgui|test_qsocagenttool$|test_qsoccliparsegeneratereportunconnected"
build-macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
host: 'mac'
target: 'desktop'
arch: 'clang_64'
modules: 'qt5compat'
cache: 'true'
cache-key-prefix: 'install-qt-action-macos'
- name: Install tools
run: |
brew install ninja pkg-config llvm
echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH
- name: Configure CMake (push - no tests)
if: github.event_name == 'push'
run: >-
cmake -B build -G Ninja
-DCMAKE_C_COMPILER=$(brew --prefix llvm)/bin/clang
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DSLANG_USE_MIMALLOC=OFF
-DENABLE_UNIT_TEST=OFF
-DENABLE_CLANG_TIDY=OFF
-DENABLE_DOXYGEN=OFF
- name: Configure CMake (PR - with tests)
if: github.event_name == 'pull_request'
run: >-
cmake -B build -G Ninja
-DCMAKE_C_COMPILER=$(brew --prefix llvm)/bin/clang
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DSLANG_USE_MIMALLOC=OFF
-DENABLE_CLANG_TIDY=OFF
-DENABLE_DOXYGEN=OFF
- name: Build
run: cmake --build build --config ${{ env.BUILD_TYPE }}
- name: Smoke Test
if: github.event_name == 'push'
run: |
set -e
QSOC=./build/qsoc.app/Contents/MacOS/qsoc
TMPD=$(mktemp -d)
trap "rm -rf $TMPD" EXIT
echo "--- version ---"
$QSOC -v
echo "--- help ---"
$QSOC -h | head -3
echo "--- project create ---"
$QSOC project create -d "$TMPD" smoke_test
echo "--- bus import ---"
printf 'Name;Mode;Direction;Width;Qualifier\npclk;slave;in;1;\nprdata;slave;out;32;data\n' > "$TMPD/smoke.csv"
$QSOC bus import -d "$TMPD" -l smoke_lib -b smoke_bus "$TMPD/smoke.csv"
echo "--- module import ---"
printf 'module smoke_mod(input clk, output [7:0] data);\nassign data = 8'\''hFF;\nendmodule\n' > "$TMPD/smoke.v"
$QSOC module import -d "$TMPD" -l smoke_lib "$TMPD/smoke.v"
echo "--- all smoke tests passed ---"
- name: Full Test
if: github.event_name == 'pull_request'
run: |
cd build
QT_QPA_PLATFORM=offscreen ctest -C ${{ env.BUILD_TYPE }} --rerun-failed --output-on-failure
cppcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install depends
run: >-
sudo apt update &&
sudo apt-get install -y
'^libxcb.*-dev'
cppcheck
libfmt-dev
libgl-dev
libglu1-mesa-dev
libicu-dev
libx11-xcb-dev
libxi-dev
libxkbcommon-dev
libxkbcommon-x11-dev
libxrender-dev
ninja-build
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
modules: 'qt5compat'
cache: 'true'
cache-key-prefix: 'install-qt-action'
- name: Configure CMake
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_CLANG_TIDY=OFF -DENABLE_DOXYGEN=OFF -DENABLE_UNIT_TEST=OFF
- name: Build
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: Static Analysis (cppcheck)
run: cmake --build build --target cppcheck