-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: merge pull request #49 from
threeal/main
Version 1.2.0 Release
- Loading branch information
Showing
6 changed files
with
178 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ updates: | |
directory: / | ||
schedule: | ||
interval: daily | ||
commit-message: | ||
prefix: chore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,131 @@ | ||
name: test | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: [latest, main] | ||
jobs: | ||
default-usage: | ||
runs-on: ${{ matrix.os }}-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows, ubuntu, macos] | ||
steps: | ||
- name: Check out this repository | ||
uses: actions/checkout@v3.3.0 | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3.5.3 | ||
|
||
- name: Move test project to the working directory | ||
- name: Move the test project to the working directory | ||
run: mv test/* . | ||
|
||
- name: Use this action | ||
- name: Use the action | ||
uses: ./ | ||
|
||
- name: Run the build result | ||
run: ${{ matrix.os == 'windows' && 'build\Debug\hello_world.exe' || 'build/hello_world' }} | ||
- name: Try to test the project | ||
id: failed-step | ||
continue-on-error: true | ||
run: ctest --test-dir build --output-on-failure --no-tests=error -R hello_world ${{ matrix.os == 'windows' && '-C Debug' || '' }} | ||
|
||
- name: Check on success | ||
if: steps.failed-step.outcome == 'success' | ||
run: exit 1 | ||
|
||
- name: Build and test the project | ||
run: | | ||
cmake --build build | ||
ctest --test-dir build --output-on-failure --no-tests=error -R hello_world ${{ matrix.os == 'windows' && '-C Debug' || '' }} | ||
specified-dir-usage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out this repository | ||
uses: actions/checkout@v3.3.0 | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3.5.3 | ||
|
||
- name: Use this action with specified directories | ||
- name: Use the action with specified directories | ||
uses: ./ | ||
with: | ||
source-dir: test | ||
build-dir: output | ||
run-test: true | ||
test-args: -R hello_world | ||
|
||
- name: Check if the default build directory does not exist | ||
run: test ! -d build && test ! -d test/build | ||
shell: bash | ||
run: test ! -e build && test ! -e test/build | ||
|
||
- name: Build and test the project | ||
run: | | ||
cmake --build output | ||
ctest --test-dir output --output-on-failure --no-tests=error -R hello_world | ||
run-build-usage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/[email protected] | ||
|
||
- name: Use the action with run build enabled | ||
uses: ./ | ||
with: | ||
source-dir: test | ||
run-build: true | ||
build-args: --target test_c --target test_cpp | ||
|
||
- name: Test the project | ||
run: ctest --test-dir test/build --output-on-failure --no-tests=error -R test | ||
|
||
run-test-usage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/[email protected] | ||
|
||
- name: Use the action with run test enabled | ||
uses: ./ | ||
with: | ||
source-dir: test | ||
run-test: true | ||
test-args: -R hello_world | ||
|
||
additional-flags-usage: | ||
runs-on: ${{ matrix.compiler == 'msvc' && 'windows' || 'ubuntu' }}-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
compiler: [gcc, msvc] | ||
steps: | ||
- name: Check out this repository | ||
uses: actions/checkout@v3.3.0 | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3.5.3 | ||
|
||
- name: Use this action with additional compiler flags | ||
- name: Use the action with additional compiler flags | ||
uses: ./ | ||
with: | ||
source-dir: test | ||
targets: test_c test_cpp | ||
run-test: true | ||
c-flags: ${{ matrix.compiler == 'msvc' && '/w /WX-' || '-Wno-unused-variable' }} | ||
cxx-flags: ${{ matrix.compiler == 'msvc' && '/w /WX-' || '-Wno-unused-variable' }} | ||
args: -D CHECK_SURPASS_WARNING=ON | ||
options: CHECK_SURPASS_WARNING=ON | ||
run-build: true | ||
build-args: --target test_c --target test_cpp | ||
run-test: true | ||
test-args: -R test ${{ matrix.compiler == 'msvc' && '-C Debug' || '' }} | ||
|
||
specified-compiler-usage: | ||
specified-generator-and-compiler-usage: | ||
runs-on: ${{ matrix.os }}-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows, ubuntu, macos] | ||
steps: | ||
- name: Check out this repository | ||
uses: actions/checkout@v3.3.0 | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3.5.3 | ||
|
||
- name: Use this action with specified compilers | ||
- name: Use the action with specified generator and compilers | ||
uses: ./ | ||
with: | ||
source-dir: test | ||
targets: test_c test_cpp | ||
run-test: true | ||
generator: Ninja | ||
c-compiler: clang | ||
cxx-compiler: clang++ | ||
args: -D CHECK_USING_CLANG=ON | ||
test-args: -R test | ||
|
||
specified-generator-usage: | ||
runs-on: ${{ matrix.os }}-latest | ||
strategy: | ||
matrix: | ||
os: [windows, ubuntu, macos] | ||
steps: | ||
- name: Check out this repository | ||
uses: actions/[email protected] | ||
|
||
- name: Use this action with a specified generator | ||
uses: ./ | ||
with: | ||
source-dir: test | ||
options: CHECK_USING_CLANG=ON | ||
run-build: true | ||
build-args: --target test_c --target test_cpp | ||
run-test: true | ||
generator: Ninja | ||
test-args: -R hello_world | ||
test-args: -R test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.* | ||
!.git* | ||
|
||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.