diff --git a/.github/workflows/build_deps.yml b/.github/workflows/build_deps.yml index e42b1a72505..9e270a0afd4 100644 --- a/.github/workflows/build_deps.yml +++ b/.github/workflows/build_deps.yml @@ -7,16 +7,18 @@ on: - main paths: - 'deps/**' + - .github/workflows/build_deps.yml push: branches: - main paths: - 'deps/**' + - .github/workflows/build_deps.yml jobs: build_deps: strategy: - fail-fast: true + fail-fast: false matrix: include: - os: ubuntu-22.04 @@ -35,6 +37,18 @@ jobs: if: matrix.os == 'Windows' uses: ilammy/msvc-dev-cmd@v1 + - name: Get the date on Ubuntu and macOS + if: matrix.os != 'windows-2019' + id: get-date-unix + run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV + shell: bash + + - name: Get the date on Windows + if: matrix.os == 'windows-2019' + id: get-date-windows + run: echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 + shell: pwsh + - name: Build on Windows if: matrix.os == 'windows-2019' working-directory: ${{ github.workspace }} @@ -43,6 +57,9 @@ jobs: mkdir ${{ github.workspace }}/deps/build mkdir ${{ github.workspace }}/deps/build/OrcaSlicer_dep .\build_release.bat deps + cd ${{ github.workspace }}/deps/build + '"C:/Program Files/7-Zip/7z.exe" a OrcaSlicer_dep_win64_${{ env.date }}.zip ${{ github.workspace }}/deps/build/OrcaSlicer_dep' + ls - name: Build on Mac x86_64 if: matrix.os == 'macos-12' && matrix.arch == 'x86_64' @@ -51,7 +68,7 @@ jobs: brew install cmake git gettext mkdir -p ${{ github.workspace }}/deps/build_x86_64 mkdir -p ${{ github.workspace }}/deps/build_x86_64/OrcaSlicer_dep_x86_64 - ./build_release_macos.sh -d -a x86_64 + ./build_release_macos.sh -dp -a x86_64 - name: Build on Mac arm64 if: matrix.os == 'macos-12' && matrix.arch == 'arm64' @@ -60,7 +77,7 @@ jobs: brew install cmake git gettext mkdir -p ${{ github.workspace }}/deps/build_arm64 mkdir -p ${{ github.workspace }}/deps/build_arm64/OrcaSlicer_dep_arm64 - ./build_release_macos.sh -d -a arm64 + ./build_release_macos.sh -dp -a arm64 - name: Build on Ubuntu if: matrix.os == 'ubuntu-22.04' @@ -76,4 +93,33 @@ jobs: mkdir -p ${{ github.workspace }}/deps/build/destdir sudo ./BuildLinux.sh -ur sudo chown $USER -R ./ - ./BuildLinux.sh -dr \ No newline at end of file + ./BuildLinux.sh -dr + + - name: Upload Mac arm64 artifacts + if: matrix.os == 'macos-12' && matrix.arch == 'arm64' + uses: actions/upload-artifact@v3 + with: + name: OrcaSlicer_dep_mac_arm64_${{ env.date }} + path: ${{ github.workspace }}/deps/build_arm64/OrcaSlicer_dep*.tar.gz + + - name: Upload Mac x86_64 artifacts + if: matrix.os == 'macos-12' && matrix.arch == 'x86_64' + uses: actions/upload-artifact@v3 + with: + name: OrcaSlicer_dep_mac_x86_64_${{ env.date }} + path: ${{ github.workspace }}/deps/build_x86_64/OrcaSlicer_dep*.tar.gz + + - name: Upload Windows artifacts + if: matrix.os == 'windows-2019' + uses: actions/upload-artifact@v3 + with: + name: OrcaSlicer_dep_win64_${{ env.date }} + path: ${{ github.workspace }}/deps/build/*.zip + + - name: Upload Ubuntu artifacts + if: matrix.os == 'ubuntu-22.04' + uses: actions/upload-artifact@v3 + with: + name: OrcaSlicer_dep_ubuntu_${{ env.date }} + path: ${{ github.workspace }}/deps/build/destdir + \ No newline at end of file diff --git a/.github/workflows/build_mac_arm64.yml b/.github/workflows/build_mac_arm64.yml index 8ecd70aea70..392d056964e 100644 --- a/.github/workflows/build_mac_arm64.yml +++ b/.github/workflows/build_mac_arm64.yml @@ -52,11 +52,11 @@ jobs: - name: Download and extract deps working-directory: ${{ github.workspace }} run: | - curl -LJO https://github.com/SoftFever/FileSharing/releases/download/2023.08/OrcaSlicer_dep_mac_arm64_02-08-2023.tar.gz - tar -zxf OrcaSlicer_dep_mac_arm64_02-08-2023.tar.gz -C ${{ github.workspace }}/deps/build_arm64 + 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_02-08-2023.tar.gz + rm OrcaSlicer_dep_mac_arm64_06-08-2023.tar.gz - name: Build studio diff --git a/.github/workflows/build_mac_x64.yml b/.github/workflows/build_mac_x64.yml index 49cebba91c1..b7663ed830e 100644 --- a/.github/workflows/build_mac_x64.yml +++ b/.github/workflows/build_mac_x64.yml @@ -53,11 +53,11 @@ jobs: - name: Download and extract deps working-directory: ${{ github.workspace }} run: | - curl -LJO https://github.com/SoftFever/FileSharing/releases/download/2023.08/OrcaSlicer_dep_mac_x86_64_02-08-2023.tar.gz - tar -zxf OrcaSlicer_dep_mac_x86_64_02-08-2023.tar.gz -C ${{ github.workspace }}/deps/build_x86_64 + 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_02-08-2023.tar.gz + rm OrcaSlicer_dep_mac_x86_64_06-08-2023.tar.gz - name: Build studio diff --git a/build_release_macos.sh b/build_release_macos.sh index dc6eff3b757..406958b3d44 100755 --- a/build_release_macos.sh +++ b/build_release_macos.sh @@ -59,7 +59,7 @@ then echo "building deps..." echo "cmake ../ -DDESTDIR=$DEPS -DOPENSSL_ARCH=darwin64-${ARCH}-cc -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES:STRING=${ARCH}" cmake ../ -DDESTDIR="$DEPS" -DOPENSSL_ARCH="darwin64-${ARCH}-cc" -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES:STRING=${ARCH} - cmake --build . --config Release --target all + cmake --build . --config Release --target deps if [ "1." == "$PACK_DEPS". ]; then tar -zcvf OrcaSlicer_dep_mac_${ARCH}_$(date +"%d-%m-%Y").tar.gz OrcaSlicer_dep_$ARCH diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 43a976444e5..a828bfef5ef 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -34,7 +34,7 @@ endif () set(DESTDIR "${CMAKE_CURRENT_BINARY_DIR}/destdir" CACHE PATH "Destination directory") set(DEP_DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Path for downloaded source packages.") -option(DEP_DEBUG "Build debug variants (only applicable on Windows)" ON) +option(DEP_DEBUG "Build debug variants (only applicable on Windows)" OFF) if(CMAKE_SYSTEM_NAME STREQUAL "Linux") option(DEP_WX_GTK3 "Build wxWidgets against GTK3" OFF)