Skip to content

Continue enhancing string sanitization #214

Continue enhancing string sanitization

Continue enhancing string sanitization #214

Workflow file for this run

name: Tests
on: push
defaults:
run:
shell: powershell
jobs:
release:
name: Run tests
runs-on: windows-2022
steps:
- name: Set Short Sha
run: |
echo "git_sha=$('${{github.sha}}'.Substring(0, 7))" >> $env:GITHUB_ENV
- name: Set Version Information - Main
if: ${{startsWith(github.ref, 'refs/tags/v')}}
run: |
echo "pbom_version=$('${{github.ref}}' -replace 'refs/tags/v','')" >> $env:GITHUB_ENV
echo "pbom_build_number=${{github.run_number}} (${{env.git_sha}})" >> $env:GITHUB_ENV
- name: Set Version Information - Branch
if: ${{startsWith(github.ref, 'refs/heads/')}}
run: |
echo "pbom_version=$('${{github.ref}}' -replace 'refs/heads/','' -replace '[^\w\d]','_')" >> $env:GITHUB_ENV
echo "pbom_build_number=${{github.run_number}} (${{env.git_sha}})" >> $env:GITHUB_ENV
- name: Install MSVC 2022
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install Qt6
uses: jurplel/install-qt-action@v3
with:
version: '6.6.1'
host: windows
target: desktop
arch: win64_msvc2019_64
dir: ${{github.workspace}}
- name: Checkout
uses: actions/checkout@v4
with:
path: code
submodules: true
- name: CMake Cache
run: |
cmake -S ${{github.workspace}}\code\ -B ${{github.workspace}}\_build\ `
-G Ninja -DCMAKE_BUILD_TYPE=Release `
-DPBOM_BUILD_NUMBER:STRING="${{env.pbom_build_number}}" `
-DPBOM_VERSION:STRING="${{env.pbom_version}}"
- name: CMake Build
run: cmake --build ${{github.workspace}}\_build\
- name: Run Tests
run: ${{github.workspace}}\_build\pbom\pbom_test.exe