mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-21 19:11:21 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.5.2...v3.5.3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
100 lines
2.7 KiB
YAML
100 lines
2.7 KiB
YAML
name: test
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches: [latest, main]
|
|
jobs:
|
|
default-usage:
|
|
runs-on: ${{ matrix.os }}-latest
|
|
strategy:
|
|
matrix:
|
|
os: [windows, ubuntu, macos]
|
|
steps:
|
|
- name: Check out this repository
|
|
uses: actions/checkout@v3.5.3
|
|
|
|
- name: Move test project to the working directory
|
|
run: mv test/* .
|
|
|
|
- name: Use this action
|
|
uses: ./
|
|
|
|
- name: Run the build result
|
|
run: ${{ matrix.os == 'windows' && 'build\Debug\hello_world.exe' || 'build/hello_world' }}
|
|
|
|
specified-dir-usage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out this repository
|
|
uses: actions/checkout@v3.5.3
|
|
|
|
- name: Use this 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
|
|
|
|
additional-flags-usage:
|
|
runs-on: ${{ matrix.compiler == 'msvc' && 'windows' || 'ubuntu' }}-latest
|
|
strategy:
|
|
matrix:
|
|
compiler: [gcc, msvc]
|
|
steps:
|
|
- name: Check out this repository
|
|
uses: actions/checkout@v3.5.3
|
|
|
|
- name: Use this 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
|
|
test-args: -R test ${{ matrix.compiler == 'msvc' && '-C Debug' || '' }}
|
|
|
|
specified-compiler-usage:
|
|
runs-on: ${{ matrix.os }}-latest
|
|
strategy:
|
|
matrix:
|
|
os: [windows, ubuntu, macos]
|
|
steps:
|
|
- name: Check out this repository
|
|
uses: actions/checkout@v3.5.3
|
|
|
|
- name: Use this action with specified 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/checkout@v3.5.3
|
|
|
|
- name: Use this action with a specified generator
|
|
uses: ./
|
|
with:
|
|
source-dir: test
|
|
run-test: true
|
|
generator: Ninja
|
|
test-args: -R hello_world
|