-
-
Notifications
You must be signed in to change notification settings - Fork 968
130 lines (114 loc) · 4.55 KB
/
build_deps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# name: Build Deps
name: Build deps
on:
pull_request:
branches:
- main
paths:
- 'deps/**'
- .github/workflows/build_deps.yml
push:
branches:
- main
paths:
- 'deps/**'
- .github/workflows/build_deps.yml
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_deps:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
- os: windows-latest
- os: macos-12
arch: x86_64
- os: macos-12
arch: arm64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: setup dev on Windows
if: matrix.os == 'Windows'
uses: microsoft/[email protected]
- name: Get the date on Ubuntu and macOS
if: matrix.os != 'windows-latest'
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-latest'
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-latest'
working-directory: ${{ github.workspace }}
run: |
choco install strawberryperl
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 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
- name: Build on Mac arm64
if: matrix.os == 'macos-12' && 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/OrcaSlicer_dep_arm64
./build_release_macos.sh -dp -a arm64
- name: Build on Ubuntu
if: matrix.os == 'ubuntu-20.04'
working-directory: ${{ github.workspace }}
run: |
sudo apt-get update
sudo apt-get install -y cmake git g++ build-essential libgl1-mesa-dev m4 \
libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules pkgconf \
libglu1-mesa-dev libcairo2-dev libgtk-3-dev libsoup2.4-dev libwebkit2gtk-4.0-dev \
libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-bad libosmesa6-dev wget sudo autoconf curl libunwind-dev
mkdir -p ${{ github.workspace }}/deps/build
mkdir -p ${{ github.workspace }}/deps/build/destdir
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'
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-latest'
uses: actions/upload-artifact@v3
with:
name: OrcaSlicer_dep_win64_${{ env.date }}
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/OrcaSlicer_dep_ubuntu_*.tar.gz