From e2d45948c6a983b0b939992fe6924a463eef6467 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 16 Sep 2024 14:46:06 +0200 Subject: [PATCH] Use common workflows --- .github/workflows/conan-package.yml | 54 +------------------ .../workflows/requirements-conan-package.txt | 0 .github/workflows/unit-test.yml | 26 ++------- 3 files changed, 6 insertions(+), 74 deletions(-) delete mode 100644 .github/workflows/requirements-conan-package.txt diff --git a/.github/workflows/conan-package.yml b/.github/workflows/conan-package.yml index dfd9415..9e6b9f7 100644 --- a/.github/workflows/conan-package.yml +++ b/.github/workflows/conan-package.yml @@ -24,58 +24,8 @@ on: jobs: # FIXME: Use main once merged - conan-recipe-version: - uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@CURA-11622_conan_v2 + conan-package: + uses: ultimaker/cura-workflows/.github/workflows/conan-package.yml@CURA-11622_conan_v2 with: project_name: nest2d - -# FIXME: Use main once merged - conan-package-export: - needs: [ conan-recipe-version ] - uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-export.yml@CURA-11622_conan_v2 - with: - recipe_id_name: ${{ needs.conan-recipe-version.outputs.project_name }} - recipe_id_version: ${{ needs.conan-recipe-version.outputs.recipe_semver_full }} - recipe_id_user: ${{ needs.conan-recipe-version.outputs.user }} - recipe_id_channel: ${{ needs.conan-recipe-version.outputs.channel }} - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - secrets: inherit - -# FIXME: Use main once merged - conan-package-create-macos: - needs: [ conan-recipe-version, conan-package-export ] - if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} - uses: ultimaker/cura-workflows/.github/workflows/conan-package-create-macos.yml@CURA-11622_conan_v2 - with: - recipe_id_name: ${{ needs.conan-recipe-version.outputs.project_name }} - recipe_id_version: ${{ needs.conan-recipe-version.outputs.recipe_semver_full }} - recipe_id_user: ${{ needs.conan-recipe-version.outputs.user }} - recipe_id_channel: ${{ needs.conan-recipe-version.outputs.channel }} - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - secrets: inherit - -# FIXME: Use main once merged - conan-package-create-windows: - needs: [ conan-recipe-version, conan-package-export ] - if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} - uses: ultimaker/cura-workflows/.github/workflows/conan-package-create-windows.yml@CURA-11622_conan_v2 - with: - recipe_id_name: ${{ needs.conan-recipe-version.outputs.project_name }} - recipe_id_version: ${{ needs.conan-recipe-version.outputs.recipe_semver_full }} - recipe_id_user: ${{ needs.conan-recipe-version.outputs.user }} - recipe_id_channel: ${{ needs.conan-recipe-version.outputs.channel }} - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - secrets: inherit - -# FIXME: Use main once merged - conan-package-create-linux: - needs: [ conan-recipe-version, conan-package-export ] - if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }} - uses: ultimaker/cura-workflows/.github/workflows/conan-package-create-linux.yml@CURA-11622_conan_v2 - with: - recipe_id_name: ${{ needs.conan-recipe-version.outputs.project_name }} - recipe_id_version: ${{ needs.conan-recipe-version.outputs.recipe_semver_full }} - recipe_id_user: ${{ needs.conan-recipe-version.outputs.user }} - recipe_id_channel: ${{ needs.conan-recipe-version.outputs.channel }} - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} secrets: inherit diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt deleted file mode 100644 index e69de29..0000000 diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 6ba68f6..f160513 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -1,6 +1,4 @@ ---- name: unit-test -# FIXME: This should be a reusable workflow on: push: @@ -46,26 +44,10 @@ on: - '[0-9].[0-9]*' - '[0-9].[0-9][0-9]*' -permissions: - contents: read - -env: - CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }} - CONAN_PASSWORD: ${{ secrets.CONAN_PASS }} - jobs: - conan-recipe-version: - uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@main - with: - project_name: nest2d - testing: - uses: ultimaker/cura-workflows/.github/workflows/unit-test.yml@main - needs: [ conan-recipe-version ] + name: Run unit tests +# FIXME: use main once merged + uses: ultimaker/cura-workflows/.github/workflows/unit-test.yml@CURA-11622_conan_v2 with: - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} - conan_extra_args: '-c tools.build:skip_test=False' - unit_test_cmd: 'ctest --output-junit engine_test.xml' - unit_test_dir: 'build/Release' - build: true - secrets: inherit + test_use_ctest: true