.gitlab-ci.yml 1.63 KB
Newer Older
Razvan Radulescu's avatar
Razvan Radulescu committed
1
variables:
Razvan Radulescu's avatar
Razvan Radulescu committed
2 3 4
  DEB_VERSION: "0.1"
  DEB_NAME: "flossy-gnu"
  BUILD_NAME: "game"
Razvan Radulescu's avatar
Razvan Radulescu committed
5
  GODOT_VERSION: "3.0.6"
Razvan Radulescu's avatar
Razvan Radulescu committed
6
  GODOT_VARIANT: "stable"
Razvan Radulescu's avatar
Razvan Radulescu committed
7 8 9 10

purism:
  stage: build
  before_script:
11
    - apt-get update -q
Razvan Radulescu's avatar
Razvan Radulescu committed
12 13
    - apt-get install -yq wget unzip fakeroot debhelper
    - mkdir -v -p ./downloads ./build/$DEB_NAME-$DEB_VERSION
14 15 16 17 18 19 20 21 22 23
    - mkdir -v -p ~/.local/share/godot/templates ~/.cache ~/.config/godot
    - cd ./downloads
    - wget "http://download.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-${GODOT_VARIANT}_linux_headless.64.zip"
    - wget "http://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-${GODOT_VARIANT}_export_templates.tpz"
    - unzip Godot_v*_linux_headless.64.zip
    - unzip Godot_v*_export_templates.tpz
    - mv -v Godot_v*_linux_headless.64 /bin/godot
    - mv -v templates ~/.local/share/godot/templates/${GODOT_VERSION}.${GODOT_VARIANT}
    - cd ..
    - rm -rf ./downloads
Razvan Radulescu's avatar
Razvan Radulescu committed
24
  script:
Razvan Radulescu's avatar
Razvan Radulescu committed
25
    - godot -v -q --path ./$BUILD_NAME --export "Linux/X11" ../build/$DEB_NAME-$DEB_VERSION/$BUILD_NAME.x64
Razvan Radulescu's avatar
Razvan Radulescu committed
26 27 28
    - mv -v ./debian/*.desktop ./build/$DEB_NAME-$DEB_VERSION
    - cp -v ./$BUILD_NAME/icon.png ./build/$DEB_NAME-$DEB_VERSION
    - ls -la ./build/$DEB_NAME-$DEB_VERSION
Razvan Radulescu's avatar
Razvan Radulescu committed
29
    - strip --strip-unneeded --remove-section=.comment --remove-section=.note ./build/$DEB_NAME-$DEB_VERSION/$BUILD_NAME.x64
Razvan Radulescu's avatar
Razvan Radulescu committed
30 31 32 33
    - cd ./build
    - tar -vcJf ${DEB_NAME}_${DEB_VERSION}.orig.tar.xz $DEB_NAME-$DEB_VERSION
    - cd ./$DEB_NAME-$DEB_VERSION
    - cp -v -r ../../debian .
Razvan Radulescu's avatar
Razvan Radulescu committed
34
    - fakeroot dpkg-buildpackage -F
Razvan Radulescu's avatar
Razvan Radulescu committed
35
    - ls -la ..
Razvan Radulescu's avatar
Razvan Radulescu committed
36
  artifacts:
Razvan Radulescu's avatar
Razvan Radulescu committed
37
    name: $DEB_NAME-$DEB_VERSION-$CI_JOB_NAME
Razvan Radulescu's avatar
Razvan Radulescu committed
38 39
    paths:
      - ./build
Razvan Radulescu's avatar
Razvan Radulescu committed
40
  tags:
41
    - librem5