Update build_windows_x64.yml #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build dependencies | |
on: | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'deps/**' | |
- '.github/workflows/**' | |
push: | |
branches: | |
- master | |
paths: | |
- 'deps/**' | |
- '.github/workflows/**' | |
jobs: | |
build_deps: | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- os: windows-2022 | |
- os: macos-13 | |
arch: x86_64 | |
#- os: macos-13 | |
# arch: arm64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: setup dev on Windows | |
if: matrix.os == 'Windows' | |
uses: ilammy/msvc-dev-cmd@v1 | |
# Build Windows dependencies | |
- name: Build on Windows | |
if: matrix.os == 'windows-2022' | |
working-directory: ${{ github.workspace }} | |
run: | | |
choco install strawberryperl | |
mkdir ${{ github.workspace }}/deps/build | |
mkdir ${{ github.workspace }}/deps/build/GalaxySlicer_dep | |
.\build_release_vs2022.bat deps | |
- name: Cleaning up the Windows Build Directory | |
if: matrix.os == 'windows-2022' | |
working-directory: ${{ github.workspace }}/deps/build | |
shell: cmd | |
run: | | |
rmdir /s /q dep_wxWidgets-prefix | |
rmdir /s /q dep_OpenSSL-prefix | |
rmdir /s /q dep_OCCT-prefix | |
rmdir /s /q dep_CGAL-prefix | |
rmdir /s /q dep_Boost-prefix | |
- name: Pack Windows dependencies | |
if: matrix.os == 'windows-2022' | |
working-directory: ${{ github.workspace }}/deps/build | |
shell: cmd | |
run: '"C:/Program Files/7-Zip/7z.exe" a -tzip GalaxySlicer_dep.zip ${{ github.workspace }}/deps/build/GalaxySlicer_dep' | |
- name: Upload Windows dependencies | |
if: matrix.os == 'windows-2022' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: GalaxySlicer_dep | |
path: ${{ github.workspace }}/deps/build/GalaxySlicer_dep.zip | |
# Build macOS x64 dependencies | |
- name: Build on macOS x64 | |
if: matrix.os == 'macos-13' && matrix.arch == 'x86_64' | |
working-directory: ${{ github.workspace }} | |
run: | | |
brew install cmake git gettext zstd libiconv automake | |
mkdir -p ${{ github.workspace }}/deps/build_x86_64 | |
mkdir -p ${{ github.workspace }}/deps/build_x86_64/GalaxySlicer_dep_x86_64 | |
./build_release_macos.sh -d -a x86_64 | |
- name: Export zstd | |
if: matrix.os == 'macos-13' && matrix.arch == 'x86_64' | |
run: | | |
brew --prefix libiconv | |
brew --prefix zstd | |
export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix zstd)/lib/ | |
- name: Cleaning up the macOS x64 Build Directory | |
if: matrix.os == 'macos-13' && matrix.arch == 'x86_64' | |
working-directory: ${{ github.workspace }}/deps/build_x86_64 | |
run: | | |
rm -r dep_* | |
- name: Pack macOS x64 dependencies | |
if: matrix.os == 'macos-13' && matrix.arch == 'x86_64' | |
working-directory: ${{ github.workspace }}/deps/build_x86_64 | |
run: 'tar cfvz GalaxySlicer_dep_x86_64.tar.gz GalaxySlicer_dep_x86_64' | |
- name: Upload macOS x86_64 dependencies | |
if: matrix.os == 'macos-13' && matrix.arch == 'x86_64' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: GalaxySlicer_dep_x86_64 | |
path: ${{ github.workspace }}/deps/build_x86_64/GalaxySlicer_dep_x86_64.tar.gz | |
# Build macOS arm64 dependencies | |
#- name: Build on macOS arm64 | |
# if: matrix.os == 'macos-13' && matrix.arch == 'arm64' | |
# working-directory: ${{ github.workspace }} | |
# run: | | |
# brew install cmake git gettext automake | |
# mkdir -p ${{ github.workspace }}/deps/build_arm64 | |
# mkdir -p ${{ github.workspace }}/deps/build_arm64/GalaxySlicer_dep_arm64 | |
# ./build_release_macos.sh -d -a arm64 | |
#- name: Cleaning up the macOS arm64 Build Directory | |
# if: matrix.os == 'macos-13' && matrix.arch == 'arm64' | |
# working-directory: ${{ github.workspace }}/deps/build_arm64 | |
# run: | | |
# rm -r dep_* | |
#- name: Pack macOS arm64 dependencies | |
# if: matrix.os == 'macos-13' && matrix.arch == 'arm64' | |
# working-directory: ${{ github.workspace }}/deps/build_arm64 | |
# run: 'tar cfvz GalaxySlicer_dep_arm64.tar.gz GalaxySlicer_dep_arm64' | |
#- name: Upload macOS arm64 dependencies | |
# if: matrix.os == 'macos-13' && matrix.arch == 'arm64' | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: GalaxySlicer_dep_arm64 | |
# path: ${{ github.workspace }}/deps/build_arm64/GalaxySlicer_dep_arm64.tar.gz |