|
@@ -0,0 +1,33 @@
|
|
1
|
+image: archlinux
|
|
2
|
+packages:
|
|
3
|
+ - rustup
|
|
4
|
+ - rsync
|
|
5
|
+ - clang
|
|
6
|
+ - wget
|
|
7
|
+sources:
|
|
8
|
+ - https://git.sr.ht/~simulacrumparty/bnglws-client
|
|
9
|
+secrets:
|
|
10
|
+ - f1ff9327-5a0c-4e7f-9217-2a3f93348270
|
|
11
|
+ - 019a0f35-1c59-4efc-a837-5e305e3c55f0
|
|
12
|
+tasks:
|
|
13
|
+ - setup: |
|
|
14
|
+ rustup default nightly
|
|
15
|
+ rustup target add x86_64-apple-darwin
|
|
16
|
+ mkdir bnglws-client/.cargo
|
|
17
|
+ echo -e '[target.x86_64-apple-darwin]\nlinker = "x86_64-apple-darwin14-clang"\nar = "x86_64-apple-darwin14-ar"' > bnglws-client/.cargo/config
|
|
18
|
+ git clone https://github.com/tpoechtrager/osxcross
|
|
19
|
+ wget -nc https://s3.dockerproject.org/darwin/v2/MacOSX10.10.sdk.tar.xz
|
|
20
|
+ mv MacOSX10.10.sdk.tar.xz osxcross/tarballs/
|
|
21
|
+ UNATTENDED=yes OSX_VERSION_MIN=10.7 ./osxcross/build.sh
|
|
22
|
+ - build: |
|
|
23
|
+ cd bnglws-client
|
|
24
|
+ cargo build --target x86_64-unknown-linux-gnu --release
|
|
25
|
+ PATH="$(pwd)/../osxcross/target/bin:$PATH" cargo build --target x86_64-apple-darwin --release
|
|
26
|
+ - deploy: |
|
|
27
|
+ cd bnglws-client
|
|
28
|
+ tar -czvf x86_64-apple-darwin.tar.gz target/x86_64-apple-darwin/release/bngl
|
|
29
|
+ tar -czvf x86_64-unknown-linux-gnu.tar.gz target/x86_64-unknown-linux-gnu/release/bngl
|
|
30
|
+ ssh_target=$(cat /home/build/.ssh_target)
|
|
31
|
+ sshopts="ssh -o StrictHostKeyChecking=no"
|
|
32
|
+ rsync --rsh="$sshopts" -rP x86_64-apple-darwin.tar.gz $ssh_target:/var/www/bnglws/static/releases/x86_64-apple-darwin.tar.gz
|
|
33
|
+ rsync --rsh="$sshopts" -rP x86_64-unknown-linux-gnu.tar.gz $ssh_target:/var/www/bnglws/static/releases/x86_64-unknown-linux-gnu.tar.gz
|