.gitlab-ci.yml 5.29 KB
Newer Older
TonyFord's avatar
TonyFord committed
1 2
stages:
  - build
TonyFord's avatar
TonyFord committed
3 4
  - start
  - stop
TonyFord's avatar
TonyFord committed
5 6
  - remove

TonyFord's avatar
TonyFord committed
7
build-electrumfair-tgz:
TonyFord's avatar
TonyFord committed
8 9 10 11 12 13 14
  stage: build
  tags:
    - FairCoin.Co
  only:
    refs:
      - master
    variables:
TonyFord's avatar
regex  
TonyFord committed
15
      - $CMD =~ /^build-electrumfair-tgz$/
TonyFord's avatar
TonyFord committed
16 17 18
  before_script:
    - export RUNNER_UID=`id -u`
    - export RUNNER_GID=`id -g`
TonyFord's avatar
ts  
TonyFord committed
19
    - mkdir -p ~/bin
TonyFord's avatar
ts  
TonyFord committed
20
    - git clone https://github.com/faircoin/electrumfair.git
TonyFord's avatar
TonyFord committed
21
  script:
TonyFord's avatar
TonyFord committed
22
    - docker-compose stop electrumfair-tgz
TonyFord's avatar
test  
TonyFord committed
23
    - docker-compose build electrumfair-tgz
TonyFord's avatar
TonyFord committed
24
    - docker-compose up -d --remove-orphans electrumfair-tgz
TonyFord's avatar
ts  
TonyFord committed
25 26
    - docker-compose exec -T electrumfair-tgz python3 -m pip install --system -r contrib/deterministic-build/requirements.txt -t contrib/../packages
    - docker-compose exec -T electrumfair-tgz contrib/make_tgz
TonyFord's avatar
test  
TonyFord committed
27
    - docker-compose exec -T electrumfair-tgz rsync -arv --include=ElectrumFair*.zip --include=ElectrumFair*.tar.gz --exclude=* /home/faircoin/electrumfair/dist/ /home/faircoin/bin
TonyFord's avatar
fix  
TonyFord committed
28
  after_script:
TonyFord's avatar
ts  
TonyFord committed
29
    - docker-compose stop electrumfair-tgz
TonyFord's avatar
TonyFord committed
30
    - docker-compose rm -f electrumfair-tgz
TonyFord's avatar
TonyFord committed
31 32 33 34 35 36 37 38 39

build-electrumfair-appimage:
  stage: build
  tags:
    - FairCoin.Co
  only:
    refs:
      - master
    variables:
TonyFord's avatar
regex  
TonyFord committed
40
      - $CMD =~ /^build-electrumfair-appimage$/
TonyFord's avatar
TonyFord committed
41 42 43 44
  before_script:
    - export RUNNER_UID=`id -u`
    - export RUNNER_GID=`id -g`
    - mkdir -p ~/bin
TonyFord's avatar
TonyFord committed
45
    - git clone https://github.com/faircoin/electrumfair.git
TonyFord's avatar
TonyFord committed
46
  script:
TonyFord's avatar
TonyFord committed
47
    - docker-compose stop electrumfair-appimage
TonyFord's avatar
test  
TonyFord committed
48
    - docker-compose build electrumfair-appimage
TonyFord's avatar
TonyFord committed
49
    - docker-compose up -d --remove-orphans electrumfair-appimage
TonyFord's avatar
TonyFord committed
50
    - docker-compose exec -T electrumfair-appimage contrib/build-linux/appimage/build.sh
TonyFord's avatar
ts  
TonyFord committed
51
    - docker-compose exec -T electrumfair-appimage rsync -arv --include=ElectrumFair*.AppImage --exclude=* /home/faircoin/electrumfair/dist/ /home/faircoin/bin
TonyFord's avatar
TonyFord committed
52

TonyFord's avatar
TonyFord committed
53 54 55 56 57 58 59 60
build-electrumfair-apk:
  stage: build
  tags:
    - FairCoin.Co
  only:
    refs:
      - master
    variables:
TonyFord's avatar
regex  
TonyFord committed
61
      - $CMD =~ /^build-electrumfair-apk$/
TonyFord's avatar
TonyFord committed
62 63 64 65 66
  before_script:
    - export RUNNER_UID=`id -u`
    - export RUNNER_GID=`id -g`
    - mkdir -p ~/bin
    - git clone https://github.com/faircoin/electrumfair.git
TonyFord's avatar
ts  
TonyFord committed
67
    - cd electrumfair && contrib/make_packages
TonyFord's avatar
ts  
TonyFord committed
68
    - mkdir --parents ./.buildozer/.gradle
TonyFord's avatar
TonyFord committed
69 70 71 72
  script:
    - docker-compose stop electrumfair-apk
    - docker-compose build electrumfair-apk
    - docker-compose up -d --remove-orphans electrumfair-apk
TonyFord's avatar
TonyFord committed
73
    - docker-compose exec -T electrumfair-apk contrib/android/make_apk
TonyFord's avatar
TonyFord committed
74
    - docker-compose exec -T electrumfair-apk rsync -arv --include=ElectrumFair*.apk --exclude=* /home/user/wspace/electrumfair/bin/ /home/user/bin
TonyFord's avatar
fix  
TonyFord committed
75
  after_script:
TonyFord's avatar
ts  
TonyFord committed
76
    - docker-compose stop electrumfair-apk
TonyFord's avatar
TonyFord committed
77
    - docker-compose rm -f electrumfair-apk
TonyFord's avatar
TonyFord committed
78
  timeout: 2h
TonyFord's avatar
TonyFord committed
79 80 81 82 83 84 85 86 87

build-electrumfair-apk-release:
  stage: build
  tags:
    - FairCoin.Co
  only:
    refs:
      - master
    variables:
TonyFord's avatar
regex  
TonyFord committed
88
      - $CMD =~ /^build-electrumfair-apk-release$/
TonyFord's avatar
TonyFord committed
89 90 91 92 93 94
  before_script:
    - export RUNNER_UID=`id -u`
    - export RUNNER_GID=`id -g`
    - mkdir -p ~/bin
    - git clone https://github.com/faircoin/electrumfair.git
    - cd electrumfair && contrib/make_packages
TonyFord's avatar
TonyFord committed
95
    - mkdir --parents ./.buildozer/.gradle
TonyFord's avatar
TonyFord committed
96 97 98 99 100 101
  script:
    - docker-compose stop electrumfair-apk
    - docker-compose build electrumfair-apk
    - docker-compose up -d --remove-orphans electrumfair-apk
    - docker-compose exec -T electrumfair-apk contrib/android/make_apk release
    - docker-compose exec -T electrumfair-apk rsync -arv --include=ElectrumFair*.apk --exclude=* /home/user/wspace/electrumfair/bin/ /home/user/bin
TonyFord's avatar
fix  
TonyFord committed
102
  after_script:
TonyFord's avatar
ts  
TonyFord committed
103
    - docker-compose stop electrumfair-apk
TonyFord's avatar
TonyFord committed
104
    - docker-compose rm -f electrumfair-apk
TonyFord's avatar
TonyFord committed
105 106
  timeout: 2h

TonyFord's avatar
ts  
TonyFord committed
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
build-electrumfair-win:
  stage: build
  tags:
    - FairCoin.Co
  only:
    refs:
      - master
    variables:
      - $CMD =~ /^build-electrumfair-win$/
  before_script:
    - export RUNNER_UID=`id -u`
    - export RUNNER_GID=`id -g`
    - mkdir -p ~/bin
    - git clone https://github.com/faircoin/electrumfair.git
  script:
    - docker-compose stop electrumfair-win
    - docker-compose build electrumfair-win
    - docker-compose up -d --remove-orphans electrumfair-win
    - docker-compose exec -T electrumfair-win ./build.sh
TonyFord's avatar
TonyFord committed
126
    - docker-compose exec -T electrumfair-win rsync -arv --include=ElectrumFair*.exe --exclude=* /opt/wine64/drive_c/electrumfair/contrib/build-wine/dist/ /home/faircoin/bin
TonyFord's avatar
fix  
TonyFord committed
127
  after_script:
TonyFord's avatar
ts  
TonyFord committed
128
    - docker-compose stop electrumfair-win
TonyFord's avatar
TonyFord committed
129
    - docker-compose rm -f electrumfair-win
TonyFord's avatar
ts  
TonyFord committed
130

TonyFord's avatar
TonyFord committed
131 132 133 134 135 136 137 138
start-php-server:
  stage: start
  tags:
    - FairCoin.Co
  only:
    refs:
      - master
    variables:
TonyFord's avatar
TonyFord committed
139
      - $CMD =~ /^build-electrumfair-tgz$|^build-electrumfair-appimage$|^build-electrumfair-apk|^build-electrumfair-win$|^start$/
TonyFord's avatar
TonyFord committed
140 141 142 143 144
  before_script:
    - export RUNNER_UID=`id -u`
    - export RUNNER_GID=`id -g`
  script:
    - docker-compose stop php-server
TonyFord's avatar
TonyFord committed
145
    - docker-compose up -d --remove-orphans php-server
TonyFord's avatar
ts  
TonyFord committed
146 147
  after_script:
    - cp ./www/index.php ~/bin/index.php
TonyFord's avatar
TonyFord committed
148 149 150 151 152 153 154 155 156

stop-php-server:
  stage: stop
  tags:
    - FairCoin.Co
  only:
    refs:
      - master
    variables:
TonyFord's avatar
regex  
TonyFord committed
157
      - $CMD =~ /^stop$/
TonyFord's avatar
TonyFord committed
158 159 160 161
  before_script:
    - export RUNNER_UID=`id -u`
    - export RUNNER_GID=`id -g`
  script:
TonyFord's avatar
ts  
TonyFord committed
162
    - docker-compose stop php-server
TonyFord's avatar
ts  
TonyFord committed
163
    - rm ~/bin/index.php
TonyFord's avatar
TonyFord committed
164

TonyFord's avatar
TonyFord committed
165 166 167 168 169 170 171 172
remove-electrumfair:
  stage: remove
  tags:
    - FairCoin.Co
  only:
    refs:
      - master
    variables:
TonyFord's avatar
regex  
TonyFord committed
173
      - $CMD =~ /^remove$/
TonyFord's avatar
TonyFord committed
174 175 176
  script:
    - docker-compose stop
    - docker-compose down
TonyFord's avatar
ts  
TonyFord committed
177
  after_script:
TonyFord's avatar
ts  
TonyFord committed
178
    - rm -R ~/bin