diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml deleted file mode 100644 index d572786c7..000000000 --- a/.github/workflows/build_linux.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Build Linux - -on: - push: - branches: - - main - paths: - - 'src/**' - - '**/CMakeLists.txt' - - 'version.inc' - - 'localization/**' - - 'resources/**' - - pull_request: - branches: - - main - paths: - - 'src/**' - - '**/CMakeLists.txt' - - 'version.inc' - - 'localization/**' - - 'resources/**' - -jobs: - appimage-builder: - name: Linux AppImage Build - - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v3 - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y autoconf build-essential cmake curl eglexternalplatform-dev \ - extra-cmake-modules file git libcairo2-dev libcurl4-openssl-dev libdbus-1-dev libglew-dev libglu1-mesa-dev \ - libglu1-mesa-dev libgstreamer1.0-dev libgstreamerd-3-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev \ - libgtk-3-dev libgtk-3-dev libmspack-dev libosmesa6-dev libsecret-1-dev libsoup2.4-dev libssl-dev libudev-dev libwayland-dev \ - libwebkit2gtk-4.0-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget - - name: Install dependencies from BuildLinux.sh - shell: bash - run: sudo ./BuildLinux.sh -ur - - name: Fix permissions - shell: bash - run: sudo chown $USER -R ./ - # - name: Build deps - # id: cache_deps - # uses: actions/cache@v3 - # env: - # cache-name: ${{ runner.os }}-cache-orcaslicer_deps_x64 - # with: - # path: ${{ github.workspace }}/deps/build/destdir - # key: build-${{ env.cache-name }} - - # - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }} - # name: Build deps - # working-directory: ${{ github.workspace }} - # continue-on-error: true - # run: ./BuildLinux.sh -dr - - name: Download and extract deps - working-directory: ${{ github.workspace }} - run: | - mkdir -p ${{ github.workspace }}/deps/build - mkdir -p ${{ github.workspace }}/deps/build/destdir - curl -LJO https://github.com/SoftFever/FileSharing/releases/download/2023.08/OrcaSlicer_dep_ubuntu_02-08-2023.tar.gz - tar -zxf OrcaSlicer_dep_ubuntu_02-08-2023.tar.gz -C ${{ github.workspace }}/deps/build - chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build/destdir - ls -l ${{ github.workspace }}/deps/build/destdir - rm OrcaSlicer_dep_ubuntu_02-08-2023.tar.gz - - - - name: Build slicer - shell: bash - run: | - ./BuildLinux.sh -isr - chmod +x ./build/OrcaSlicer_ubu64.AppImage - - - uses: actions/upload-artifact@v3 - with: - name: OrcaSlicer_Linux - path: './build/OrcaSlicer_ubu64.AppImage' diff --git a/.github/workflows/build_mac_arm64.yml b/.github/workflows/build_mac_arm64.yml deleted file mode 100644 index 3a9d6d3a0..000000000 --- a/.github/workflows/build_mac_arm64.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: Build Mac AppleSilicon - -on: - push: - branches: - - main - paths: - - 'src/**' - - '**/CMakeLists.txt' - - 'version.inc' - - 'localization/**' - - 'resources/**' - - pull_request: - branches: - - main - paths: - - 'src/**' - - '**/CMakeLists.txt' - - 'version.inc' - - 'localization/**' - - 'resources/**' - -jobs: - build_osx_arm64: - name: Build Mac AppleSilicon - runs-on: macos-12 - - steps: - - uses: actions/checkout@v3 - - - name: Install tools - run: | - brew install cmake git gettext zstd - - run: mkdir -p ${{ github.workspace }}/deps/build_arm64 - - run: mkdir -p ${{ github.workspace }}/deps/build_arm64/OrcaSlicer_dep_arm64 - - # - name: build deps - # id: cache_deps - # uses: actions/cache@v3 - # env: - # cache-name: ${{ runner.os }}-cache-orcaslicer_deps_arm64 - # with: - # path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep - # key: build-${{ env.cache-name }} - - # - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }} - # name: build deps - # working-directory: ${{ github.workspace }} - # continue-on-error: true - # run: ./build_release_macos.sh -d -a arm64 - - name: Download and extract deps - working-directory: ${{ github.workspace }} - run: | - curl -LJO https://github.com/SoftFever/FileSharing/releases/download/2023.08.2/OrcaSlicer_dep_mac_arm64_06-08-2023.tar.gz - tar -zxfOrcaSlicer_dep_mac_arm64_06-08-2023.tar.gz -C ${{ github.workspace }}/deps/build_arm64 - chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build_arm64/OrcaSlicer_dep_arm64 - ls -l ${{ github.workspace }}/deps/build_arm64/OrcaSlicer_dep_arm64 - rm OrcaSlicer_dep_mac_arm64_06-08-2023.tar.gz - - - - name: Build slicer - working-directory: ${{ github.workspace }} - run: | - ./build_release_macos.sh -s -n -a arm64 - - - name: Sign app - working-directory: ${{ github.workspace }} - if: github.event_name != 'pull_request' - env: - BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} - P12_PASSWORD: ${{ secrets.P12_PASSWORD }} - KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} - CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }} - run: | - CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 - KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db - echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH - security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH - security set-keychain-settings -lut 21600 $KEYCHAIN_PATH - security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH - security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH - security list-keychain -d user -s $KEYCHAIN_PATH - security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $P12_PASSWORD $KEYCHAIN_PATH - codesign --deep --force --verbose --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build_arm64/OrcaSlicer/OrcaSlicer.app - - - name: Pack app - working-directory: ${{ github.workspace }} - run: | - export ver=$(grep '^#define SoftFever_VERSION' ./build_arm64/src/libslic3r/libslic3r_version.h | cut -d ' ' -f3) - ver="_V${ver//\"}" - cd ${{ github.workspace }}/build_arm64/OrcaSlicer - zip -FSrq OrcaSlicer${ver}_Mac_AppleSilicon_signed.zip ./OrcaSlicer.app - - # (wip: staple failed, error 65) - # - name: Notarize the app - # run: | - # cd ${{ github.workspace }}/build_arm64/OrcaSlicer - # xcrun notarytool store-credentials "notarytool-profile" --apple-id "${{ secrets.APPLE_DEV_ACCOUNT }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_PWD }}" - # ditto -c -k --keepParent "OrcaSlicer.app" "OrcaSlicer.zip" - # xcrun notarytool submit "OrcaSlicer.zip" --keychain-profile "notarytool-profile" --wait - # xcrun stapler staple OrcaSlicer.app - # zip -FSrq OrcaSlicer_Mac_notarized.zip OrcaSlicer.app - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: OrcaSlicer_Mac_AppleSilicon - path: ${{ github.workspace }}/build_arm64/OrcaSlicer/OrcaSlicer*.zip \ No newline at end of file diff --git a/.github/workflows/build_mac_x64.yml b/.github/workflows/build_mac_x64.yml deleted file mode 100644 index 9473901fc..000000000 --- a/.github/workflows/build_mac_x64.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: Build Mac Intel - -on: - push: - branches: - - main - paths: - - 'src/**' - - '**/CMakeLists.txt' - - 'version.inc' - - 'localization/**' - - 'resources/**' - - pull_request: - branches: - - main - paths: - - 'src/**' - - '**/CMakeLists.txt' - - 'version.inc' - - 'localization/**' - - 'resources/**' - -jobs: - build_osx_x86_64: - name: Build Mac Intel - runs-on: macos-12 - - steps: - - uses: actions/checkout@v3 - - - name: Install tools - run: | - brew install cmake git gettext - - run: mkdir -p ${{ github.workspace }}/deps/build_x86_64 - - run: mkdir -p ${{ github.workspace }}/deps/build_x86_64/OrcaSlicer_dep_x86_64 - - # - name: build deps - # id: cache_deps - # uses: actions/cache@v3 - # env: - # cache-name: ${{ runner.os }}-cache-orcaslicer_deps_x64 - # with: - # path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep - # key: build-${{ env.cache-name }} - - # - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }} - # name: build deps - # working-directory: ${{ github.workspace }} - # continue-on-error: true - # run: ./build_release_macos.sh -d -a x86_64 - - - name: Download and extract deps - working-directory: ${{ github.workspace }} - run: | - curl -LJO https://github.com/SoftFever/FileSharing/releases/download/2023.08.2/OrcaSlicer_dep_mac_x86_64_06-08-2023.tar.gz - tar -zxf OrcaSlicer_dep_mac_x86_64_06-08-2023.tar.gz -C ${{ github.workspace }}/deps/build_x86_64 - chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build_x86_64/OrcaSlicer_dep_x86_64 - ls -l ${{ github.workspace }}/deps/build_x86_64/OrcaSlicer_dep_x86_64 - rm OrcaSlicer_dep_mac_x86_64_06-08-2023.tar.gz - - - - name: Build slicer - working-directory: ${{ github.workspace }} - run: ./build_release_macos.sh -s -n -a x86_64 - - - name: Sign app - working-directory: ${{ github.workspace }} - env: - BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} - P12_PASSWORD: ${{ secrets.P12_PASSWORD }} - KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} - CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }} - if: github.event_name != 'pull_request' - run: | - CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 - KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db - echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH - security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH - security set-keychain-settings -lut 21600 $KEYCHAIN_PATH - security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH - security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH - security list-keychain -d user -s $KEYCHAIN_PATH - security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $P12_PASSWORD $KEYCHAIN_PATH - codesign --deep --force --verbose --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build_x86_64/OrcaSlicer/OrcaSlicer.app - - - name: pack app - working-directory: ${{ github.workspace }} - run: | - export ver=$(grep '^#define SoftFever_VERSION' ./build_x86_64/src/libslic3r/libslic3r_version.h | cut -d ' ' -f3) - ver="_V${ver//\"}" - cd ${{ github.workspace }}/build_x86_64/OrcaSlicer - zip -FSrq OrcaSlicer${ver}_Mac_Intel_signed.zip OrcaSlicer.app - - # (wip: staple failed, error 65) - # - name: Notarize the app - # run: | - # xcrun notarytool store-credentials "notarytool-profile" --apple-id "${{ secrets.APPLE_DEV_ACCOUNT }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_PWD }}" - # ditto -c -k --keepParent "OrcaSlicer.app" "OrcaSlicer.zip" - # xcrun notarytool submit "OrcaSlicer.zip" --keychain-profile "notarytool-profile" --wait - # xcrun stapler staple OrcaSlicer.app - # zip -FSrq OrcaSlicer_Mac_notarized.zip OrcaSlicer.app - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: OrcaSlicer_Mac_Intel - path: ${{ github.workspace }}/build_x86_64/OrcaSlicer/OrcaSlicer*.zip diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml new file mode 100644 index 000000000..630b65070 --- /dev/null +++ b/.github/workflows/build_orca.yml @@ -0,0 +1,271 @@ +name: Build OrcaSlicer + +on: + push: + branches: + - main + paths: + - 'src/**' + - '**/CMakeLists.txt' + - 'version.inc' + - 'localization/**' + - 'resources/**' + - ".github/workflows/build_orca.yml" + + pull_request: + branches: + - main + paths: + - 'src/**' + - '**/CMakeLists.txt' + - 'version.inc' + - 'localization/**' + - 'resources/**' + - ".github/workflows/build_orca.yml" + +jobs: + build_orca: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: windows-2019 + - os: macos-12 + arch: x86_64 + - os: macos-12 + arch: arm64 + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Get the version and date on Ubuntu and macOS + if: matrix.os != 'windows-2019' + id: get-version-unix + run: | + ver=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2) + echo "ver=$ver" >> $GITHUB_ENV + echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV + shell: bash + + - name: Get the version and date on Windows + if: matrix.os == 'windows-2019' + id: get-version-windows + run: | + echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 + # Extract the version from the file + $versionContent = Get-Content version.inc -Raw + if ($versionContent -match 'set\(SoftFever_VERSION "(.*?)"\)') { + $ver = $matches[1] + } + echo "ver=$ver" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 + echo "date: ${{ env.date }} version: $ver" + shell: pwsh + +# Mac + - name: Install tools mac + if: matrix.os == 'macos-12' + run: | + brew install cmake git gettext zstd + mkdir -p ${{ github.workspace }}/deps/build_${{matrix.arch}} + mkdir -p ${{ github.workspace }}/deps/build_${{matrix.arch}}/OrcaSlicer_dep_${{matrix.arch}} + + # - name: build deps + # if: matrix.os == 'macos-12' + # id: cache_deps + # uses: actions/cache@v3 + # env: + # cache-name: ${{ runner.os }}-cache-orcaslicer_deps_${{matrix.arch}} + # with: + # path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep + # key: build-${{ env.cache-name }} + + # - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }} + # name: build deps + # working-directory: ${{ github.workspace }} + # continue-on-error: true + # run: ./build_release_macos.sh -d -a ${{matrix.arch}} + - name: Download and extract deps + if: matrix.os == 'macos-12' + working-directory: ${{ github.workspace }} + run: | + curl -LJO https://github.com/SoftFever/FileSharing/releases/download/2023.08.2/OrcaSlicer_dep_mac_${{matrix.arch}}_06-08-2023.tar.gz + tar -zxfOrcaSlicer_dep_mac_${{matrix.arch}}_06-08-2023.tar.gz -C ${{ github.workspace }}/deps/build_${{matrix.arch}} + chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build_${{matrix.arch}}/OrcaSlicer_dep_${{matrix.arch}} + ls -l ${{ github.workspace }}/deps/build_${{matrix.arch}}/OrcaSlicer_dep_${{matrix.arch}} + rm OrcaSlicer_dep_mac_${{matrix.arch}}_06-08-2023.tar.gz + + + - name: Build slicer mac + if: matrix.os == 'macos-12' + working-directory: ${{ github.workspace }} + run: | + ./build_release_macos.sh -s -n -a ${{matrix.arch}} + + - name: Sign app + if: matrix.os == 'macos-12' + working-directory: ${{ github.workspace }} + env: + BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} + P12_PASSWORD: ${{ secrets.P12_PASSWORD }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }} + run: | + CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 + KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db + echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH + security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH + security set-keychain-settings -lut 21600 $KEYCHAIN_PATH + security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH + security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH + security list-keychain -d user -s $KEYCHAIN_PATH + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $P12_PASSWORD $KEYCHAIN_PATH + codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/OrcaSlicer.app + ln -s /Applications ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/Applications + hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_V${{ env.ver }}_Mac_${{matrix.arch}}.dmg + codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_V${{ env.ver }}_Mac_${{matrix.arch}}.dmg + + # Thanks to RaySajuuk, it's working now + - name: Notarize the app + if: matrix.os == 'macos-12' + working-directory: ${{ github.workspace }} + run: | + xcrun notarytool store-credentials "notarytool-profile" --apple-id "${{ secrets.APPLE_DEV_ACCOUNT }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_PWD }}" + xcrun notarytool submit "OrcaSlicer_V${{ env.ver }}_Mac_${{matrix.arch}}.dmg" --keychain-profile "notarytool-profile" --wait + xcrun stapler staple OrcaSlicer_V${{ env.ver }}_Mac_${{matrix.arch}}.dmg + + - name: Upload artifacts mac + if: matrix.os == 'macos-12' + uses: actions/upload-artifact@v3 + with: + name: OrcaSlicer_V${{ env.ver }}_Mac_AppleSilicon + path: ${{ github.workspace }}/OrcaSlicer_V${{ env.ver }}_Mac_${{matrix.arch}}.dmg + +# Windows + - name: setup MSVC + if: matrix.os == 'windows-2019' + uses: ilammy/msvc-dev-cmd@v1 + + - name: Install perl + if: matrix.os == 'windows-2019' + run: | + choco install strawberryperl + + - name: download deps + if: matrix.os == 'windows-2019' + shell: powershell + run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/SoftFever/FileSharing/releases/download/4/OrcaSlicer_dep_18Jul2023.zip", "$env:temp\OrcaSlicer_dep_18Jul2023.zip")' + + - name: maker dir + if: matrix.os == 'windows-2019' + working-directory: ${{ github.workspace }} + run: | + mkdir ${{ github.workspace }}/deps/build + mkdir ${{ github.workspace }}/deps/build/OrcaSlicer_dep + + - name: extract deps + if: matrix.os == 'windows-2019' + working-directory: ${{ github.workspace }}/deps/build + shell: cmd + run: '"C:/Program Files/7-Zip/7z.exe" x %temp%\OrcaSlicer_dep_18Jul2023.zip' + + # - name: build deps + # if: matrix.os == 'windows-2019' + # id: cache_deps + # uses: actions/cache@v3 + # env: + # cache-name: ${{ runner.os }}-cache-orcaslicer_deps + # with: + # path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep + # key: ${{ runner.os }}-build-${{ env.cache-name }} + + # - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }} + # name: build deps + # working-directory: ${{ github.workspace }} + # continue-on-error: true + # run: .\build_release.bat deps + + # - run: Get-ChildItem ${{ github.workspace }}/deps/build/ -Exclude OrcaSlicer_dep | Remove-Item -Recurse -Force + + - name: Build slicer Win + if: matrix.os == 'windows-2019' + working-directory: ${{ github.workspace }} + run: .\build_release.bat slicer + + # - name: pack app + # if: matrix.os == 'windows-2019' + # working-directory: ${{ github.workspace }}/build + # shell: cmd + # run: '"C:/Program Files/7-Zip/7z.exe" a -tzip OrcaSlicer_dev_build.zip ${{ github.workspace }}/build/OrcaSlicer' + + - name: Upload artifacts Win + if: matrix.os == 'windows-2019' + uses: actions/upload-artifact@v3 + with: + name: OrcaSlicer_V${{ env.date }}_Win64 + path: ${{ github.workspace }}/build/OrcaSlicer + +# Ubuntu + + - name: Install dependencies + if: matrix.os == 'ubuntu-20.04' + run: | + sudo apt-get update + sudo apt-get install -y autoconf build-essential cmake curl eglexternalplatform-dev \ + extra-cmake-modules file git libcairo2-dev libcurl4-openssl-dev libdbus-1-dev libglew-dev libglu1-mesa-dev \ + libglu1-mesa-dev libgstreamer1.0-dev libgstreamerd-3-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev \ + libgtk-3-dev libgtk-3-dev libmspack-dev libosmesa6-dev libsecret-1-dev libsoup2.4-dev libssl-dev libudev-dev libwayland-dev \ + libwebkit2gtk-4.0-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget + + - name: Install dependencies from BuildLinux.sh + if: matrix.os == 'ubuntu-20.04' + shell: bash + run: sudo ./BuildLinux.sh -ur + + - name: Fix permissions + if: matrix.os == 'ubuntu-20.04' + shell: bash + run: sudo chown $USER -R ./ + # - name: Build deps + # if: matrix.os == 'ubuntu-20.04' + # id: cache_deps + # uses: actions/cache@v3 + # env: + # cache-name: ${{ runner.os }}-cache-orcaslicer_deps_x64 + # with: + # path: ${{ github.workspace }}/deps/build/destdir + # key: build-${{ env.cache-name }} + + # - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }} + # name: Build deps + # working-directory: ${{ github.workspace }} + # continue-on-error: true + # run: ./BuildLinux.sh -dr + - name: Download and extract deps + if: matrix.os == 'ubuntu-20.04' + working-directory: ${{ github.workspace }} + run: | + mkdir -p ${{ github.workspace }}/deps/build + mkdir -p ${{ github.workspace }}/deps/build/destdir + curl -LJO https://github.com/SoftFever/FileSharing/releases/download/2023.08/OrcaSlicer_dep_ubuntu_02-08-2023.tar.gz + tar -zxf OrcaSlicer_dep_ubuntu_02-08-2023.tar.gz -C ${{ github.workspace }}/deps/build + chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build/destdir + ls -l ${{ github.workspace }}/deps/build/destdir + rm OrcaSlicer_dep_ubuntu_02-08-2023.tar.gz + + + - name: Build slicer + if: matrix.os == 'ubuntu-20.04' + shell: bash + run: | + ./BuildLinux.sh -isr + chmod +x ./build/OrcaSlicer_ubu64.AppImage + + - name: Upload artifacts Win + if: matrix.os == 'ubuntu-20.04' + uses: actions/upload-artifact@v3 + with: + name: OrcaSlicer_V${{ env.ver }}_Linux + path: './build/OrcaSlicer_ubu64.AppImage' diff --git a/.github/workflows/build_win.yml b/.github/workflows/build_win.yml deleted file mode 100644 index 02258bea4..000000000 --- a/.github/workflows/build_win.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Build Win64 - -on: - push: - branches: - - main - paths: - - 'src/**' - - '**/CMakeLists.txt' - - 'version.inc' - - 'localization/**' - - 'resources/**' - - '.github/workflows/build_win.yml' - - pull_request: - branches: - - main - paths: - - 'src/**' - - '**/CMakeLists.txt' - - 'version.inc' - - 'localization/**' - - 'resources/**' - - '.github/workflows/build_win.yml' - -jobs: - build_win64: - name: Build Win64 - runs-on: windows-2019 - - steps: - - uses: actions/checkout@v3 - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install perl - run: | - choco install strawberryperl - - run: mkdir ${{ github.workspace }}/deps/build - - run: mkdir ${{ github.workspace }}/deps/build/OrcaSlicer_dep - - name: download deps - shell: powershell - run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/SoftFever/FileSharing/releases/download/4/OrcaSlicer_dep_18Jul2023.zip", "$env:temp\OrcaSlicer_dep_18Jul2023.zip")' - - name: extract deps - working-directory: ${{ github.workspace }}/deps/build - shell: cmd - run: '"C:/Program Files/7-Zip/7z.exe" x %temp%\OrcaSlicer_dep_18Jul2023.zip' - - - run: dir "${{ github.workspace }}\deps\build\OrcaSlicer_dep" - - # - name: build deps - # id: cache_deps - # uses: actions/cache@v3 - # env: - # cache-name: ${{ runner.os }}-cache-orcaslicer_deps - # with: - # path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep - # key: ${{ runner.os }}-build-${{ env.cache-name }} - - # - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }} - # name: build deps - # working-directory: ${{ github.workspace }} - # continue-on-error: true - # run: .\build_release.bat deps - - # - run: Get-ChildItem ${{ github.workspace }}/deps/build/ -Exclude OrcaSlicer_dep | Remove-Item -Recurse -Force - - - name: Build slicer - working-directory: ${{ github.workspace }} - run: .\build_release.bat slicer - - # - name: pack app - # working-directory: ${{ github.workspace }}/build - # shell: cmd - # run: '"C:/Program Files/7-Zip/7z.exe" a -tzip OrcaSlicer_dev_build.zip ${{ github.workspace }}/build/OrcaSlicer' - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: OrcaSlicer_Win64_nightly - path: ${{ github.workspace }}/build/OrcaSlicer \ No newline at end of file diff --git a/scripts/disable_validation.entitlements b/scripts/disable_validation.entitlements new file mode 100644 index 000000000..123d12a53 --- /dev/null +++ b/scripts/disable_validation.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.cs.disable-library-validation + + +