This repository was archived by the owner on Aug 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathci-setup.sh
More file actions
55 lines (42 loc) · 1.31 KB
/
ci-setup.sh
File metadata and controls
55 lines (42 loc) · 1.31 KB
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
#!/bin/bash
sudo apt update -y
# Install dependencies
sudo apt install -y build-essential \
git \
wget \
cmake \
clang \
mingw-w64 \
gcc-arm-linux-gnueabihf \
gcc-aarch64-linux-gnu \
gcc-i686-linux-gnu \
# Install Rust targets
rustup target add x86_64-pc-windows-gnu
rustup target add i686-pc-windows-gnu
rustup target add x86_64-unknown-linux-gnu
rustup target add i686-unknown-linux-gnu
rustup target add aarch64-unknown-linux-gnu
rustup target add arm-unknown-linux-gnueabihf
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
setup_osxcross() {
# Set up OSX cross compilation toolchain
git clone https://github.com/tpoechtrager/osxcross
cd osxcross
# Install osxcross dependencies
sudo ./tools/get_dependencies.sh
# Download Big Sur 11.1 SDK
wget -nc https://github.com/joseluisq/macosx-sdks/releases/download/11.1/MacOSX11.1.sdk.tar.xz
mv MacOSX11.1.sdk.tar.xz tarballs/
# Build clang
UNATTENDED=yes OSX_VERSION_MIN=11.1 ./build.sh
# Check if target exists
if [ ! -d "target" ]; then
echo "target directory does not exist"
exit 1
fi
cd ../
}
if [ ! -d "osxcross/target" ]; then
setup_osxcross
fi