summaryrefslogtreecommitdiff
path: root/.cirrus.yml
blob: 7b3dba0c91dd5cf97429af23802718905a791d8b (plain)
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
test_task:
  use_compute_credits: true
  container:
    matrix:
      - image: erlang:22
      - image: erlang:21
      - image: erlang:20
      - image: erlang:19
      - image: erlang:18
  test_script: |
    ./bootstrap
    ./rebar3 ct

osx_test_task:
  osx_instance:
    image: mojave-base
  install_script: brew install erlang
  test_script: |
    ./bootstrap
    ./rebar3 ct

nightly_task:
  container:
    image: erlang:18
  depends_on:
    - test
  only_if: $BRANCH == "master"
  script: |
    apt-get update
    apt-get install -y s3cmd
    ./bootstrap
    s3cmd --access_key=$ACCESS_KEY --secret_key=$SECRET_KEY put ./rebar3 s3://rebar3-nightly
  environment:
    ACCESS_KEY: ENCRYPTED[86c639224b3cfc11ae5dbd48b13de5ff77dd5c75f1bf1808ddbbb5bc60049f16885b4e2e3a7981376cac562f7a2d176b]
    SECRET_KEY: ENCRYPTED[189c3b982c2f846193bb34c3de86e0172b8a4c793699f64dc95bb9a1e6bbe83c252c77d37ea1503928aa9b41a3652ca3]

release_task:
  container:
    image: erlang:18
  depends_on:
    - test
  only_if: $CIRRUS_TAG != ''
  script: |
    apt-get update
    apt-get install -y s3cmd
    ./bootstrap
    s3cmd --access_key=$ACCESS_KEY --secret_key=$SECRET_KEY put ./rebar3 s3://rebar3

    url_to_upload="https://uploads.github.com/repos/$CIRRUS_REPO_FULL_NAME/releases/$CIRRUS_RELEASE/assets?name=rebar3"
    curl -X POST \
    --data-binary @rebar3 \
    --header "Authorization: token $GITHUB_TOKEN" \
    --header "Content-Type: application/octet-stream" \
    $url_to_upload
  environment:
    ACCESS_KEY: ENCRYPTED[86c639224b3cfc11ae5dbd48b13de5ff77dd5c75f1bf1808ddbbb5bc60049f16885b4e2e3a7981376cac562f7a2d176b]
    SECRET_KEY: ENCRYPTED[189c3b982c2f846193bb34c3de86e0172b8a4c793699f64dc95bb9a1e6bbe83c252c77d37ea1503928aa9b41a3652ca3]
    GITUB_TOKEN: ENCRYPTED[ff884c4b0a4f2833b6c22c1fd6398879d58634d0f521e7efbd33f045fb785417f24da953cfbdaee563698501691e5970]


# Windows CI appears broken for now and never passes
#windows_test_task:
#  windows_container:
#    image: cirrusci/windowsservercore:2019
#    os_version: 2019
#  install_script: choco install -y erlang
#  test_script: |
#    ./bootstrap
#    ./rebar3 ct