From b49662ceb66d860aa51120987028a90e07838f7a Mon Sep 17 00:00:00 2001 From: SoftFever Date: Fri, 1 Mar 2024 21:20:38 +0800 Subject: [PATCH] update ci/cd --- .github/workflows/build_orca.yml | 22 +++++++++++++++++++++- .github/workflows/check_profiles.yml | 15 ++++++++++++--- BuildLinux.sh | 7 +++++-- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index 745bc52897e..81658842b5e 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -244,7 +244,16 @@ jobs: ./BuildLinux.sh -isr mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage chmod +x ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage - + + - name: Build orca_custom_preset_tests + if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' + working-directory: ${{ github.workspace }}/build/src + shell: bash + run: | + OrcaSlicer_profile_validator -p ${{ github.workspace }}/resources/profiles -g 1 + cd ${{ github.workspace }}/resources/profiles + zip -r orca_custom_preset_tests.zip user/ + - name: Upload artifacts Ubuntu if: inputs.os == 'ubuntu-20.04' uses: actions/upload-artifact@v3 @@ -262,3 +271,14 @@ jobs: asset_name: OrcaSlicer_Linux_${{ env.ver }}.AppImage asset_content_type: application/octet-stream max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted + + - name: Deploy orca_custom_preset_tests + if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' + uses: WebFreak001/deploy-nightly@v3.0.0 + with: + upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label} + release_id: 137995723 + asset_path: ${{ github.workspace }}/resources/profiles/orca_custom_preset_tests.zip + asset_name: orca_custom_preset_tests + asset_content_type: application/octet-stream + max_releases: 1 diff --git a/.github/workflows/check_profiles.yml b/.github/workflows/check_profiles.yml index e1d18fd5484..a8f2b05786f 100644 --- a/.github/workflows/check_profiles.yml +++ b/.github/workflows/check_profiles.yml @@ -19,12 +19,21 @@ jobs: - name: Download working-directory: ${{ github.workspace }} run: | - curl -LJO https://github.com/SoftFever/Orca_tools/releases/download/1/OrcaSlicer_profile_validator_ubuntu - chmod +x ./OrcaSlicer_profile_validator_ubuntu + curl -LJO https://github.com/SoftFever/Orca_tools/releases/download/1/OrcaSlicer_profile_validator + chmod +x ./OrcaSlicer_profile_validator # validate profiles - - name: validate profiles + - name: validate system profiles run: | ./OrcaSlicer_profile_validator_ubuntu -p ${{ github.workspace }}/resources/profiles -l 2 + - name: validate custom presets + working-directory: ${{ github.workspace }} + run: | + curl -LJO https://github.com/SoftFever/OrcaSlicer/releases/download/nightly-builds/orca_custom_preset_tests.zip + unzip ./orca_custom_preset_tests.zip -d ${{ github.workspace }}/resources/profiles + ./OrcaSlicer_profile_validator_ubuntu -p ${{ github.workspace }}/resources/profiles -l 2 + + + diff --git a/BuildLinux.sh b/BuildLinux.sh index 94b250ba5a4..772617aaf35 100755 --- a/BuildLinux.sh +++ b/BuildLinux.sh @@ -227,13 +227,16 @@ then # cmake pushd build - echo -e "cmake .. -DCMAKE_PREFIX_PATH=\"$PWD/../deps/build/destdir/usr/local\" -DSLIC3R_STATIC=1 ${BUILD_ARGS}" - cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local" -DSLIC3R_STATIC=1 ${BUILD_ARGS} + echo -e "cmake .. -DCMAKE_PREFIX_PATH=\"$PWD/../deps/build/destdir/usr/local\" -DSLIC3R_STATIC=1 -DORCA_TOOLS=ON ${BUILD_ARGS}" + cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local" -DSLIC3R_STATIC=1 ${BUILD_ARGS} -DORCA_TOOLS=ON echo "done" # make Slic3r echo "[8/9] Building Slic3r..." make -j$NCORES OrcaSlicer # Slic3r + + # make OrcaSlicer_profile_validator + make -j$NCORES OrcaSlicer_profile_validator popd ./run_gettext.sh echo "done"