Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into CURA-11622_conan_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Nov 27, 2024
2 parents 6428c82 + 53ee9fd commit a2f3edc
Show file tree
Hide file tree
Showing 83 changed files with 6,009 additions and 1,105 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/npm-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: NPM package

on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to build'
required: true
default: 'main'

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Sync pip requirements
run: curl -O https://raw.githubusercontent.com/Ultimaker/cura-workflows/main/.github/workflows/requirements-runner.txt
working-directory: .github/workflows

- name: Setup Python and pip
uses: actions/setup-python@v4
with:
python-version: 3.11.x
cache: pip
cache-dependency-path: .github/workflows/requirements-runner.txt

- name: Install Python requirements and Create default Conan profile
run: pip install -r .github/workflows/requirements-runner.txt

- name: Install Linux system requirements for building
run: |
mkdir runner_scripts
cd runner_scripts
curl -O https://raw.githubusercontent.com/Ultimaker/cura-workflows/main/runner_scripts/ubuntu_setup.sh
chmod +x ubuntu_setup.sh
sudo ./ubuntu_setup.sh
- name: Setup pipeline caches
run: |
mkdir -p /home/runner/.conan/downloads
mkdir -p /home/runner/.conan/data
- name: Create default Conan profile
run: conan profile new default --detect

# FIXME: Once merged to main: conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
- name: Get Conan configuration
run: |
conan config install https://github.com/Ultimaker/conan-config.git
conan config install https://github.com/Ultimaker/conan-config.git -a "-b NP-419"
- name: Add runner credentials to cura remote
run: conan user -p ${{ secrets.CONAN_PASS }} -r cura ${{ secrets.CONAN_USER }}

- name: Cache Conan packages
uses: actions/cache@v3
with:
path: /home/runner/.conan/data
key: ${{ runner.os }}-conan-data-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-conan-data-
- name: Cache Conan downloads
uses: actions/cache@v3
with:
path: /home/runner/.conan/downloads
key: ${{ runner.os }}-conan-downloads-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-conan-downloads-
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
registry-url: 'https://npm.pkg.github.com'
scope: '@ultimaker'

- name: Set npm config
run: |
npm run install_curaengine
npm ci
npm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload the Package(s)
if: ${{ always() }}
run: |
conan remove "cura_private_data/*" --force
conan remove "fdm_materials/*" --force
conan upload "*" -r cura --all -c
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ set(engine_SRCS # Except main.cpp.
src/Mold.cpp
src/multiVolumes.cpp
src/path_ordering.cpp
src/PathAdapter.cpp
src/Preheat.cpp
src/PrimeTower/PrimeTower.cpp
src/PrimeTower/PrimeTowerNormal.cpp
Expand Down Expand Up @@ -142,7 +143,6 @@ set(engine_SRCS # Except main.cpp.
src/utils/ListPolyIt.cpp
src/utils/Matrix4x3D.cpp
src/utils/MinimumSpanningTree.cpp
src/utils/Point3LL.cpp
src/utils/PolygonConnector.cpp
src/utils/PolygonsPointIndex.cpp
src/utils/PolygonsSegmentIndex.cpp
Expand All @@ -157,6 +157,14 @@ set(engine_SRCS # Except main.cpp.
src/utils/VoxelUtils.cpp
src/utils/MixedPolylineStitcher.cpp

src/utils/scoring/BestElementFinder.cpp
src/utils/scoring/CornerScoringCriterion.cpp
src/utils/scoring/DistanceScoringCriterion.cpp
src/utils/scoring/ExclusionAreaScoringCriterion.cpp
src/utils/scoring/RandomScoringCriterion.cpp

src/geometry/Point2LL.cpp
src/geometry/Point3LL.cpp
src/geometry/Polygon.cpp
src/geometry/Shape.cpp
src/geometry/PointsSet.cpp
Expand Down Expand Up @@ -188,6 +196,7 @@ target_compile_definitions(_CuraEngine
$<$<AND:$<BOOL:${ENABLE_PLUGINS}>,$<BOOL:${ENABLE_REMOTE_PLUGINS}>>:ENABLE_REMOTE_PLUGINS>
$<$<BOOL:${OLDER_APPLE_CLANG}>:OLDER_APPLE_CLANG>
CURA_ENGINE_VERSION=\"${CURA_ENGINE_VERSION}\"
CURA_ENGINE_HASH=\"${CURA_ENGINE_HASH}\"
$<$<BOOL:${ENABLE_TESTING}>:BUILD_TESTS>
PRIVATE
$<$<BOOL:${WIN32}>:NOMINMAX>
Expand Down
Loading

0 comments on commit a2f3edc

Please sign in to comment.