-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
codemagic.yaml
79 lines (69 loc) · 2.05 KB
/
codemagic.yaml
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
scripts:
- &rustup
name: Rustup
script: >-
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
--default-toolchain nightly
-c rustfmt
-c rust-src
-t thumbv7em-none-eabihf
- &install_sdk
name: SDK
script: |
URL="https://download.panic.com/playdate_sdk/PlaydateSDK-${SDK_VERSION?}.zip"
curl -L -sS --show-error --fail "${URL?}" -o sdk.zip
unzip sdk.zip
sudo installer -store -pkg "PlaydateSDK.pkg" -target /
echo "CFG: $(cat ~/.Playdate/config)"
export PLAYDATE_SDK_PATH="$(grep -E '^\s*SDKRoot' ~/.Playdate/config | head -n 1 | awk '{print $2}')"
echo "SDK root: $PLAYDATE_SDK_PATH"
echo "SDK version=$(cat $PLAYDATE_SDK_PATH/VERSION.txt)"
echo "PLAYDATE_SDK_PATH=$PLAYDATE_SDK_PATH" >> $CM_ENV
# clean
rm -rf sdk.zip
rm -rf PlaydateSDK.pkg
rm -rf __MACOSX
workflows:
test:
name: 'Tests / Tool: Run'
max_build_duration: 20
instance_type: mac_mini_m1
environment:
groups:
- github_credentials
vars:
CARGO_INCREMENTAL: 1
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
CARGO_TERM_COLOR: always
CARGO_TERM_PROGRESS_WHEN: never
RUST_LOG: trace
CARGO_PLAYDATE_LOG: trace
SDK_VERSION: latest
PLAYDATE_SDK_PATH: ~/Developer/PlaydateSDK
xcode: latest
cache:
cache_paths:
- ~/.rustup
- ~/.cargo
- ./target
triggering:
events:
- pull_request
cancel_previous_builds: false
# when:
# condition: not event.pull_request.draft
scripts:
- *rustup
- *install_sdk
- name: Execution
script: |
source "$HOME/.cargo/env"
RUSTFLAGS="--cfg exec_tests" cargo test -p=cargo-playdate run:: -- --nocapture
sudo killall "Playdate Simulator"
- name: Reset manifests
script: git checkout HEAD -- ./Cargo.*
- name: Clean
script: |
rm -rf ./target/tmp || true
rm -rf ./target/playdate || true