diff --git a/.github/workflows/self_check.yml b/.github/workflows/self_check.yml index 0290ecd..1b81fa1 100644 --- a/.github/workflows/self_check.yml +++ b/.github/workflows/self_check.yml @@ -131,7 +131,6 @@ jobs: if: ${{ needs.changes.outputs.tests == 'true' }} uses: ./.github/workflows/tests.yml with: - library: strong_ptr repo: libhal/strong_ptr secrets: inherit diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8cbde55..ec54598 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,40 +17,50 @@ name: 🧪 tests on: workflow_call: inputs: - library: + repo: type: string - default: ${{ github.event.repository.name }} + default: ${{ github.repository }} + description: "The repo with the conan package to build from" version: type: string default: "" - coverage: - type: boolean - default: false - fail_on_coverage: - type: boolean - default: false - coverage_threshold: - type: string - default: "40 80" - repo: + description: "Version of the git repo to checkout. Must match an available git ref or tag. The tag must follow SEMVER-2." + dir: type: string - required: true + default: "." + description: "Directory where the conan package exists" conan_version: type: string default: 2.22.2 + description: "Which conan version to install" config2_version: type: string default: main - # Directory where the conan package exists - dir: + description: "Set the version to pull the libhal conan-config2 info. This must be a tagged version of the config-conan2 repo" + + # ======================================================================== + # Deprecated inputs + # ======================================================================== + library: type: string - default: "." - # (DEPRECATED) Version of LLVM to install via homebrew, no longer used - # The llvm binary comes from the llvm-toolchain package within the llvm - # profile. + default: ${{ github.event.repository.name }} + description: "(DEPRECATED) No longer needed or used." llvm: type: string default: "17" + description: "(DEPRECATED) Version of LLVM to install via homebrew, no longer used The llvm binary comes from the llvm-toolchain package within the llvm profile." + coverage: + type: boolean + default: false + description: "(DEPRECATED) No longer used, coverage should be handled by the package itself." + fail_on_coverage: + type: boolean + default: false + description: "(DEPRECATED) No longer used, coverage should be handled by the package itself." + coverage_threshold: + type: string + default: "40 80" + description: "(DEPRECATED) No longer used, coverage should be handled by the package itself." jobs: run_tests: strategy: @@ -105,4 +115,4 @@ jobs: run: conan config install https://github.com/libhal/conan-config2.git --args="-b ${{ inputs.config2_version }}" - name: 🔬 Create & Run Unit Tests - run: conan create ${{ inputs.dir }} -s:h build_type=Debug --version='latest' -s:h os=${{ matrix.os }} -s:h arch=${{ matrix.arch }} --build=missing -pr:h hal/tc/llvm -o "*:enable_clang_tidy=True" + run: conan create ${{ inputs.dir }} -s:h build_type=Debug --version=latest -s:h os=${{ matrix.os }} -s:h arch=${{ matrix.arch }} --build=missing -pr:h hal/tc/llvm -o "*:enable_clang_tidy=True" diff --git a/README.md b/README.md index 20459e3..5901790 100644 --- a/README.md +++ b/README.md @@ -341,6 +341,7 @@ Creates Conan packages for a specific platform/architecture and uploads to a rep - `conan_remote_password`: Password for Conan repository **Usage:** + ```yaml jobs: deploy: @@ -399,21 +400,23 @@ jobs: ### tests.yml -Runs unit tests on multiple platforms with optional coverage reporting. +Runs unit tests on multiple platforms. **Inputs:** -- `library` (string, **required**): Library name -- `version` (string): Version/tag to checkout. Default: "" -- `coverage` (boolean, **required**): Enable code coverage -- `fail_on_coverage` (boolean, **required**): Fail on coverage threshold -- `coverage_threshold` (string, **required**): Coverage thresholds -- `repo` (string, **required**): GitHub repository -- `conan_version` (string, **required**): Conan version +- `repo` (string): GitHub repository to build from. Default: current repository +- `version` (string): Version/tag to checkout. Default: "" (uses current branch) +- `dir` (string): Directory containing the Conan package. Default: "." +- `conan_version` (string): Conan version. Default: "2.22.2" - `config2_version` (string): conan-config2 branch/tag. Default: "main" -- `dir` (string): Package directory. Default: "." -- `llvm` (string): **(DEPRECATED NO LONGER USED)**. Tests will use the latest - version of LLVM available in the libhal conan-config2 repo. + +**Deprecated Inputs (no longer used):** + +- `library` (string): No longer needed, repo name is auto-detected +- `llvm` (string): LLVM version now comes from llvm-toolchain package in llvm profile +- `coverage` (boolean): Coverage should be handled by the package itself +- `fail_on_coverage` (boolean): Coverage should be handled by the package itself +- `coverage_threshold` (string): Coverage should be handled by the package itself Runs tests on: @@ -422,16 +425,21 @@ Runs tests on: **Usage:** +```yaml +jobs: + tests: + uses: libhal/ci/.github/workflows/tests.yml@5.x.y + secrets: inherit +``` + +Or with custom options: + ```yaml jobs: tests: uses: libhal/ci/.github/workflows/tests.yml@5.x.y with: - library: libhal-util repo: libhal/libhal-util - coverage: true - fail_on_coverage: false - coverage_threshold: "40 80" conan_version: "2.22.2" secrets: inherit ```