Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade deps #2349

Merged
merged 13 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/build_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ jobs:
mkdir ${{ github.workspace }}/deps/build
mkdir ${{ github.workspace }}/deps/build/OrcaSlicer_dep
.\build_release_vs2022.bat deps
.\build_release_vs2022.bat pack
cd ${{ github.workspace }}/deps/build

- name: Build on Mac x86_64
if: matrix.os == 'macos-12' && matrix.arch == 'x86_64'
working-directory: ${{ github.workspace }}
run: |
brew install cmake git gettext
brew install cmake git gettext automake
mkdir -p ${{ github.workspace }}/deps/build_x86_64
mkdir -p ${{ github.workspace }}/deps/build_x86_64/OrcaSlicer_dep_x86_64
./build_release_macos.sh -dp -a x86_64
Expand All @@ -76,7 +77,7 @@ jobs:
if: matrix.os == 'macos-12' && matrix.arch == 'arm64'
working-directory: ${{ github.workspace }}
run: |
brew install cmake git gettext
brew install cmake git gettext automake
mkdir -p ${{ github.workspace }}/deps/build_arm64
mkdir -p ${{ github.workspace }}/deps/build_arm64/OrcaSlicer_dep_arm64
./build_release_macos.sh -dp -a arm64
Expand All @@ -96,6 +97,8 @@ jobs:
sudo ./BuildLinux.sh -ur
sudo chown $USER -R ./
./BuildLinux.sh -dr
cd deps/build
tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir

- name: Upload Mac arm64 artifacts
if: matrix.os == 'macos-12' && matrix.arch == 'arm64'
Expand All @@ -116,12 +119,12 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: OrcaSlicer_dep_win64_${{ env.date }}
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.zip

- name: Upload Ubuntu artifacts
if: matrix.os == 'ubuntu-20.04'
uses: actions/upload-artifact@v3
with:
name: OrcaSlicer_dep_ubuntu_${{ env.date }}
path: ${{ github.workspace }}/deps/build/destdir
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz

52 changes: 26 additions & 26 deletions .github/workflows/build_orca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
matrix:
include:
- os: ubuntu-20.04
- os: windows-2019
- os: windows-latest
- os: macos-12
arch: x86_64
- os: macos-12
Expand All @@ -44,7 +44,7 @@ jobs:
uses: actions/checkout@v3

- name: Get the version and date on Ubuntu and macOS
if: matrix.os != 'windows-2019'
if: matrix.os != 'windows-latest'
id: get-version-unix
run: |
ver=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
Expand All @@ -53,7 +53,7 @@ jobs:
shell: bash

- name: Get the version and date on Windows
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-latest'
id: get-version-windows
run: |
echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
Expand All @@ -70,7 +70,7 @@ jobs:
- name: Install tools mac
if: matrix.os == 'macos-12'
run: |
brew install cmake git gettext zstd
brew install cmake git gettext zstd tree
mkdir -p ${{ github.workspace }}/deps/build_${{matrix.arch}}
mkdir -p ${{ github.workspace }}/deps/build_${{matrix.arch}}/OrcaSlicer_dep_${{matrix.arch}}

Expand All @@ -93,11 +93,11 @@ jobs:
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
curl -LJO https://github.com/SoftFever/OrcaSlicer_deps/releases/download/OrcaSlicer_deps_Oct2023/OrcaSlicer_dep_mac_${{matrix.arch}}_20231008.tar.gz
tar -zvxf ./OrcaSlicer_dep_mac_${{matrix.arch}}_20231008.tar.gz -C ${{ github.workspace }}/deps/build_${{matrix.arch}}
chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build_${{matrix.arch}}
tree ${{ github.workspace }}/deps/build_${{matrix.arch}}
rm ./OrcaSlicer_dep_mac_${{matrix.arch}}_20231008.tar.gz


- name: Build slicer mac
Expand Down Expand Up @@ -149,34 +149,34 @@ jobs:

# Windows
- name: setup MSVC
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1.1

- name: Install nsis
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-latest'
run: |
choco install nsis

- name: download deps
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-latest'
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")'
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/SoftFever/OrcaSlicer_deps/releases/download/OrcaSlicer_deps_Oct2023/OrcaSlicer_dep_win64_20230810_vs2022.zip", "$env:temp\OrcaSlicer_dep_win64_20230810_vs2022.zip")'

- name: maker dir
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-latest'
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'
if: matrix.os == 'windows-latest'
working-directory: ${{ github.workspace }}/deps/build
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" x %temp%\OrcaSlicer_dep_18Jul2023.zip'
run: '"C:/Program Files/7-Zip/7z.exe" x %temp%\OrcaSlicer_dep_win64_20230810_vs2022.zip'

# - name: build deps
# if: matrix.os == 'windows-2019'
# if: matrix.os == 'windows-latest'
# id: cache_deps
# uses: actions/cache@v3
# env:
Expand All @@ -194,31 +194,31 @@ jobs:
# - run: Get-ChildItem ${{ github.workspace }}/deps/build/ -Exclude OrcaSlicer_dep | Remove-Item -Recurse -Force

- name: Build slicer Win
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-latest'
working-directory: ${{ github.workspace }}
run: .\build_release.bat slicer
run: .\build_release_vs2022.bat slicer

- name: Create installer Win
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-latest'
working-directory: ${{ github.workspace }}/build
run: |
cpack -G NSIS

# - name: pack app
# if: matrix.os == 'windows-2019'
# if: matrix.os == 'windows-latest'
# 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 zip
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: OrcaSlicer_Windows_V${{ env.ver }}_portable
path: ${{ github.workspace }}/build/OrcaSlicer

- name: Upload artifacts Win installer
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: OrcaSlicer_Windows_V${{ env.ver }}
Expand Down Expand Up @@ -265,11 +265,11 @@ jobs:
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
curl -LJO https://github.com/SoftFever/OrcaSlicer_deps/releases/download/OrcaSlicer_deps_Oct2023/OrcaSlicer_dep_ubuntu_20231008.zip
unzip ./OrcaSlicer_dep_ubuntu_20231008.zip -d ${{ github.workspace }}/deps/build/destdir
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
rm OrcaSlicer_dep_ubuntu_20231008.zip


- name: Build slicer
Expand Down
2 changes: 1 addition & 1 deletion build_release_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ then
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
tar -zcvf OrcaSlicer_dep_mac_${ARCH}_$(date +"%Y%m%d").tar.gz OrcaSlicer_dep_$ARCH
fi
fi

Expand Down
23 changes: 21 additions & 2 deletions build_release_vs2022.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
@REM OcarSlicer build script for Windows
@echo off
set WP=%CD%

@REM Pack deps
if "%1"=="pack" (
setlocal ENABLEDELAYEDEXPANSION
cd %WP%/deps/build
for /f "tokens=2-4 delims=/ " %%a in ('date /t') do set build_date=%%c%%b%%a
echo packing deps: OrcaSlicer_dep_win64_!build_date!_vs2022.zip

%WP%/tools/7z.exe a OrcaSlicer_dep_win64_!build_date!_vs2022.zip OrcaSlicer_dep
exit /b 0
)

setlocal DISABLEDELAYEDEXPANSION
cd deps
mkdir build
cd build
set DEPS=%CD%/OrcaSlicer_dep

if "%1"=="slicer" (
GOTO :slicer
)
echo "building deps.."


cmake ../ -G "Visual Studio 17 2022" -A x64 -DDESTDIR="%CD%/OrcaSlicer_dep" -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release --target deps -- -m

Expand All @@ -18,9 +36,10 @@ cd %WP%
mkdir build
cd build

cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./OrcaSlicer" -DCMAKE_BUILD_TYPE=Release
echo cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./OrcaSlicer" -DCMAKE_BUILD_TYPE=Release
cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./OrcaSlicer" -DCMAKE_BUILD_TYPE=Release -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.22000.0"
cmake --build . --config Release --target ALL_BUILD -- -m
cd ..
call run_gettext.bat
cd build
cmake --build . --target install --config Release
cmake --build . --target install --config Release
7 changes: 4 additions & 3 deletions deps/CURL/CURL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ set(_curl_platform_flags
)

if (WIN32)
set(_curl_platform_flags ${_curl_platform_flags} -DCMAKE_USE_SCHANNEL=ON)
#set(_curl_platform_flags ${_curl_platform_flags} -DCMAKE_USE_SCHANNEL=ON)
set(_curl_platform_flags ${_curl_platform_flags} -DCMAKE_USE_OPENSSL=ON -DCURL_CA_PATH:STRING=none)
elseif (APPLE)
set(_curl_platform_flags

Expand Down Expand Up @@ -71,9 +72,9 @@ orcaslicer_add_cmake_project(CURL
${_curl_platform_flags}
)

if (APPLE OR (CMAKE_SYSTEM_NAME STREQUAL "Linux"))
# if (APPLE OR (CMAKE_SYSTEM_NAME STREQUAL "Linux"))
add_dependencies(dep_CURL dep_OpenSSL)
endif ()
# endif ()

if (MSVC)
add_debug_dep(dep_CURL)
Expand Down
8 changes: 4 additions & 4 deletions deps/OpenSSL/OpenSSL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ endif()

ExternalProject_Add(dep_OpenSSL
#EXCLUDE_FROM_ALL ON
#URL "https://github.com/openssl/openssl/archive/OpenSSL_1_1_1k.tar.gz"
URL "https://github.com/openssl/openssl/archive/refs/tags/openssl-3.1.2.tar.gz"
#URL_HASH SHA256=b92f9d3d12043c02860e5e602e50a73ed21a69947bcc74d391f41148e9f6aa95
URL_HASH SHA256=8c776993154652d0bb393f506d850b811517c8bd8d24b1008aef57fbe55d3f31
URL "https://github.com/openssl/openssl/archive/OpenSSL_1_1_1w.tar.gz"
URL_HASH SHA256=2130E8C2FB3B79D1086186F78E59E8BC8D1A6AEDF17AB3907F4CB9AE20918C41
# URL "https://github.com/openssl/openssl/archive/refs/tags/openssl-3.1.2.tar.gz"
# URL_HASH SHA256=8c776993154652d0bb393f506d850b811517c8bd8d24b1008aef57fbe55d3f31
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/OpenSSL
CONFIGURE_COMMAND ${_conf_cmd} ${_cross_arch}
"--openssldir=${DESTDIR}/usr/local"
Expand Down
Binary file added tools/7z.exe
Binary file not shown.
Loading