diff --git a/.github/workflows/gcodeanalyzer.yml b/.github/workflows/gcodeanalyzer.yml index 29c83817de..0b85fb75aa 100644 --- a/.github/workflows/gcodeanalyzer.yml +++ b/.github/workflows/gcodeanalyzer.yml @@ -81,28 +81,6 @@ jobs: fetch-depth: 1 token: ${{ secrets.GITHUB_TOKEN }} - - name: Determine the corresponding Cura branch - id: curabranch - run: | - status_code=$(curl -s -o /dev/null -w "%{http_code}" "https://api.github.com/repos/ultimaker/cura/branches/${{ github.head_ref }}") - if [ "$status_code" -eq 200 ]; then - echo "The branch exists in Cura" - echo "branch=${{ github.head_ref }}" >> $GITHUB_OUTPUT - else - echo "branch=main" >> $GITHUB_OUTPUT - fi - - - name: Checkout Cura - uses: actions/checkout@v3 - with: - repository: 'Ultimaker/Cura' - ref: ${{ steps.curabranch.outputs.branch}} - path: 'Cura' - fetch-depth: 1 - sparse-checkout: | - resources/definitions - resources/extruders - - name: Sync pip requirements run: curl -O https://raw.githubusercontent.com/Ultimaker/cura-workflows/main/.github/workflows/requirements-runner.txt working-directory: CuraEngine/.github/workflows @@ -159,7 +137,7 @@ jobs: ${{ runner.os }}-conan-downloads- - name: Install dependencies - run: conan install . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -s build_type=Release --build=missing --update -g GitHubActionsRunEnv -g GitHubActionsBuildEnv -c tools.build:skip_test=True + run: conan install . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -s build_type=Release --build=missing --update -g GitHubActionsRunEnv -g GitHubActionsBuildEnv -c tools.build:skip_test=True -o with_cura_resources=True working-directory: CuraEngine - name: Set Environment variables from Conan install (bash) @@ -167,7 +145,6 @@ jobs: run: | . ./activate_github_actions_runenv.sh . ./activate_github_actions_buildenv.sh - echo "CURA_ENGINE_SEARCH_PATH=$GITHUB_WORKSPACE/Cura/resources/definitions:$GITHUB_WORKSPACE/Cura/resources/extruders" >> $GITHUB_ENV working-directory: CuraEngine/build/Release/generators - name: Build CuraEngine and tests @@ -180,7 +157,7 @@ jobs: run: | for file in `ls ../NightlyTestModels/*.stl`; do - ( time ./build/Release/CuraEngine slice --force-read-parent --force-read-nondefault -v -p -j ../Cura/resources/definitions/ultimaker_s3.def.json -l $file -o ../`basename $file .stl`.gcode ) 2> ../`basename $file .stl`.time + ( time ./build/Release/CuraEngine slice --force-read-parent --force-read-nondefault -v -p -j $CURA_RESOURCES/definitions/ultimaker_s3.def.json -l $file -o ../`basename $file .stl`.gcode ) 2> ../`basename $file .stl`.time done working-directory: CuraEngine diff --git a/conandata.yml b/conandata.yml index 858634c9a0..38e20233f1 100644 --- a/conandata.yml +++ b/conandata.yml @@ -5,3 +5,5 @@ requirements_arcus: - "arcus/5.3.1" requirements_plugins: - "curaengine_grpc_definitions/(latest)@ultimaker/testing" +requirements_cura_resources: + - "cura_resources/(latest)@ultimaker/testing" diff --git a/conanfile.py b/conanfile.py index a696e03a1c..127a23576f 100644 --- a/conanfile.py +++ b/conanfile.py @@ -32,6 +32,7 @@ class CuraEngineConan(ConanFile): "enable_plugins": [True, False], "enable_sentry": [True, False], "enable_remote_plugins": [True, False], + "with_cura_resources": [True, False], } default_options = { "enable_arcus": True, @@ -40,6 +41,7 @@ class CuraEngineConan(ConanFile): "enable_plugins": True, "enable_sentry": False, "enable_remote_plugins": False, + "with_cura_resources": False, } def set_version(self): @@ -116,6 +118,9 @@ def requirements(self): self.requires("grpc/1.50.1") for req in self.conan_data["requirements_plugins"]: self.requires(req) + if self.options.with_cura_resources: + for req in self.conan_data["requirements_cura_resources"]: + self.requires(req) if self.options.enable_arcus or self.options.enable_plugins: self.requires("protobuf/3.21.12") self.requires("clipper/6.4.2@ultimaker/stable")