-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
991 additions
and
1,047 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners | ||
|
||
# In this example, those users owns any file in an checking directory | ||
# anywhere in your repository. | ||
|
||
* @edwardstock |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: "Build CMake target" | ||
description: "Build and run project target" | ||
|
||
inputs: | ||
build-dir: | ||
required: false | ||
description: "Build directory" | ||
default: "_build" | ||
build-type: | ||
required: false | ||
description: "CMake build type" | ||
default: "Release" | ||
args: | ||
required: false | ||
description: "Extra cmake arguments" | ||
default: "" | ||
target: | ||
required: true | ||
description: "CMake target name" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Create build environment | ||
shell: bash | ||
id: create-build-env # adding an id for this step to reference it later | ||
run: | | ||
mkdir -p ${{ github.workspace }}/${{ inputs.build-dir }} | ||
echo "work-dir=${{ github.workspace }}/${{ inputs.build-dir }}" >> $GITHUB_OUTPUT | ||
- name: Configure | ||
working-directory: ${{ steps.create-build-env.outputs.work-dir }} # using output variable | ||
shell: bash | ||
run: cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} ${{ inputs.args }} | ||
- name: Build target | ||
working-directory: ${{ steps.create-build-env.outputs.work-dir }} # using output variable | ||
shell: bash | ||
run: cmake --build . --target ${{ inputs.target }} |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: "Run Tests" | ||
description: "Build and run project tests" | ||
|
||
inputs: | ||
build-dir: | ||
required: false | ||
description: "Build directory" | ||
default: "_test_build" | ||
cmake-args: | ||
required: false | ||
description: "Test cmake arguments" | ||
default: "-Dtoolbox_BUILD_TESTS=On" | ||
test-target: | ||
required: false | ||
description: "Test binary name" | ||
default: "toolbox-test" | ||
test-binary: | ||
required: false | ||
description: "Test binary name" | ||
default: "toolbox-test" | ||
conan-enabled: | ||
required: false | ||
description: "Enable conan" | ||
default: "true" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Create test environment | ||
shell: bash | ||
id: create-test-env # adding an id for this step to reference it later | ||
run: | | ||
mkdir -p ${{ github.workspace }}/${{ inputs.build-dir }} | ||
echo "work-dir=${{ github.workspace }}/${{ inputs.build-dir }}" >> $GITHUB_OUTPUT | ||
- name: Configure project with tests (conan build) | ||
if: ${{ inputs.conan-enabled }} | ||
working-directory: ${{ steps.create-test-env.outputs.work-dir }} # using output variable | ||
shell: bash | ||
run: cmake .. -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=modules/conan_provider.cmake -DCMAKE_BUILD_TYPE=Debug ${{ inputs.cmake-args }} | ||
- name: Configure project with tests | ||
if: ${{ !inputs.conan-enabled }} | ||
working-directory: ${{ steps.create-test-env.outputs.work-dir }} # using output variable | ||
shell: bash | ||
run: cmake .. -DCMAKE_BUILD_TYPE=Debug ${{ inputs.cmake-args }} | ||
- name: Build target | ||
working-directory: ${{ steps.create-test-env.outputs.work-dir }} # using output variable | ||
shell: bash | ||
run: cmake --build . --target ${{ inputs.test-target }} | ||
- name: Run tests | ||
shell: bash | ||
run: | | ||
${{ steps.create-test-env.outputs.work-dir }}/bin/${{ inputs.test-binary }} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: "Setup Conan" | ||
description: "Upgrade pip, install conan, setup remote and login to artifactory" | ||
|
||
inputs: | ||
artifactory_api_key: | ||
required: true | ||
description: "Artifactory API key" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Conan | ||
shell: bash | ||
run: | | ||
pip install --upgrade pip | ||
pip install conan | ||
conan profile detect --force | ||
conan remote add edwardstock https://conan.edwardstock.com/artifactory/api/conan/conan-local | ||
conan remote login -p ${{ inputs.artifactory_api_key }} edwardstock admin |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: "Setup Python 3.11" | ||
description: "Install python 3.11" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build & Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-and-test-linux-gcc: | ||
name: Build Conan Packages with GCC | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
gcc: [ 7, 8, 9, 10, 11 ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: lukka/get-cmake@latest | ||
|
||
- name: Set up GCC | ||
uses: egor-tensin/setup-gcc@v1 | ||
with: | ||
version: ${{ matrix.gcc }} | ||
platform: x64 | ||
|
||
- name: Setup Python | ||
uses: ./.github/actions/setup-python | ||
|
||
- name: Setup Conan | ||
uses: ./.github/actions/setup-conan | ||
with: | ||
artifactory_api_key: ${{ secrets.ARTIFACTORY_API_KEY }} | ||
|
||
- name: Run Tests | ||
uses: ./.github/actions/run-tests | ||
|
||
- name: Build deploy artifacts | ||
run: $(which python3) ${{ github.workspace }}/deploy.py build | ||
|
||
- name: Upload deploy artifacts | ||
run: $(which python3) ./deploy.py upload |
Oops, something went wrong.