-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
86 lines (77 loc) · 2.78 KB
/
.travis.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
language: c
sudo: true
dist: xenial
env:
global:
- NAME: glfw
- ASDF_SYSTEM: bodge-glfw
- PATH: ~/.bodge/bin/:$PATH
- secure: Yug8ZSWsbZKP6p5AbVZ3TG2XiukvZpZPc6K3er+b+576lYhJqgs9EI6wCMsfZtXV8A/Ez+49iW0dEBABOHCNe5mvX6Kr4vACoqywVmJ7IVvpt6hpqNjbQ/nMEdLaf/izxrnL8YKqU8qYcF+aJc4T3EOaz5nKgt2pfZuXgpwSbOhRhQbPxjJ45gyqvYJbccvk72h1WrFnU926EfQ7THb/7VHJLidH+eH5GE+mLj9NY1tZYqNI0LTApVkTBxkfvz8gAC8ZR30W/eitah/cEzBROuvmspvU8CpOib2sfQdm3XDJ0LMo7kwlfUbNshM9l2gNzruwWoDOEtGspnb4Rixll3ZzLFRrlTmlV2a2NfKLCcyeakvRiYzrmcZu8lr3Ve0pZ3WYP2c6a1CnU6FL6kVxEJ+D+EXJLmfIZbZDkxbV39ui+PgaRdQ/CUijVfyn/2XZf8FwJpdJhYSJyznPeAg+7C1U2ea+f2smoAHv/Y7TtetqQip/O8ycKnCfUT6TRZ5JRslY75s8qZE3Q/6XQWWfO3rigrGSKL5tuN4uoB3OM5JeN9m7p1ltklaXh6Mfiph8/WnLtlAFGKh2B9RuOPU3ffcIYudHIy7dVPuGkVwdvbQuroDQZEnrxO5ptefT8qlaKJzs/aczlgm9F6qKu1p/BS5XAJjvWj9g1oulWAwctRU=
matrix:
include:
- os: linux
env:
- TARGET_ARCH=i686
- CFLAGS=-m32
- EXTENSION=so
- OUTPUT_FILE=lib$NAME.$EXTENSION.bodged
- os: linux
env:
- TARGET_ARCH=x86_64
- CFLAGS=-m64
- EXTENSION=so
- OUTPUT_FILE=lib$NAME.$EXTENSION.bodged
- os: osx
env:
- TARGET_ARCH=i686
- CFLAGS=-m32
- EXTENSION=dylib
- OUTPUT_FILE=lib$NAME.bodged.$EXTENSION
- os: osx
env:
- TARGET_ARCH=x86_64
- CFLAGS=-m64
- EXTENSION=dylib
- OUTPUT_FILE=lib$NAME.bodged.$EXTENSION
branches:
only:
- "/^v\\d+(\\.\\d+)+$/"
before_install:
- >
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get update -q
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install patchelf gcc-multilib xorg-dev
fi
install:
- curl -L http://bodge.borodust.org/files/install.sh | sh
script:
- export TARGET_FILE=$TRAVIS_BUILD_DIR/lib$NAME.$EXTENSION.bodged-$TARGET_ARCH-$TRAVIS_OS_NAME-$TRAVIS_BRANCH
- export TARGET_SPEC=$TARGET_FILE-spec.zip
- >
cd $TRAVIS_BUILD_DIR/src/lib/ && cmake -G "Unix Makefiles" \
-DCMAKE_C_FLAGS=$(CFLAGS) \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_SHARED_LIBS=ON \
-DLIBRARY_OUTPUT_PATH=$TRAVIS_BUILD_DIR/src/lib \
-DGLFW_BUILD_TESTS=OFF \
-DGLFW_BUILD_DOCS=OFF \
-DGLFW_INSTALL=OFF \
-DGLFW_BUILD_EXAMPLES=OFF . && \
make
- lisp regen-local-spec-and-zip --arch $TARGET_ARCH "$TRAVIS_BUILD_DIR" $ASDF_SYSTEM "$TARGET_SPEC"
before_deploy:
- mv $TRAVIS_BUILD_DIR/src/lib/$OUTPUT_FILE $TARGET_FILE
- >
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
patchelf --set-rpath '@ORIGIN/' "$TARGET_FILE";
patchelf --set-soname "lib$NAME.$EXTENSION.bodged" "$TARGET_FILE";
fi
deploy:
provider: releases
api-key: $GITHUB_TOKEN
file: [$TARGET_FILE, $TARGET_SPEC]
skip_cleanup: true
overwrite: true
on:
tags: true