Skip to content

Commit

Permalink
ext
Browse files Browse the repository at this point in the history
  • Loading branch information
nawaz1991 committed Dec 4, 2023
1 parent 335caaf commit df88d84
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/common-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ on:

jobs:
build:
runs-on: ${{ inputs.os }}
strategy:
matrix:
include:
- os: windows-latest
exec_ext: .exe
- os: ubuntu-latest
exec_ext: ''
- os: macos-latest
exec_ext: ''

runs-on: ${{ matrix.os }}
steps:
- name: Checkout cpp-oasvalidator
uses: actions/checkout@v4
Expand All @@ -22,22 +32,13 @@ jobs:
uses: lukka/run-cmake@v10
id: runcmake
with:
workflowPreset: 'build-test-and-example'
testPresets: 'run-oasvalidator-unittests'
workflowPreset: 'build-example-and-run-unittests'

- name: Run Example
run: |
if ($env:RUNNER_OS -eq "Windows") {
build/release/example/oasvalidator-example.exe
} else {
build/release/example/oasvalidator-example
}
- name: Run Unit Tests
run: build/release/test/unittest/oasvalidator-unittests${{ matrix.exec_ext }}

- name: Run Example
run: build/release/example/oasvalidator-example${{ matrix.exec_ext }}

- name: Run Performance Tests
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
build/release/test/perftest/oasvalidator-perftests.exe
else
build/release/test/perftest/oasvalidator-perftests
fi
run: build/release/test/perftest/oasvalidator-perftests${{ matrix.exec_ext }}
8 changes: 6 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@
]
},
{
"name": "build-test-and-example",
"displayName": "Build oasvalidator, unittest, perftests and example in Release mode",
"name": "build-example-and-run-unittests",
"displayName": "Build oasvalidator, unittest, perftests and example in Release mode and run unittests",
"steps": [
{
"type": "configure",
Expand All @@ -122,6 +122,10 @@
{
"type": "build",
"name": "tests-build"
},
{
"type": "test",
"name": "run-oasvalidator-unittests"
}
]
}
Expand Down

0 comments on commit df88d84

Please sign in to comment.