.gitlab-ci.yml 1.56 KB
Newer Older
Razvan Radulescu's avatar
Razvan Radulescu committed
1
variables:
Razvan Radulescu's avatar
Razvan Radulescu committed
2 3 4 5 6
  DEB_VERSION: "0.1"
  DEB_NAME: "flossy-gnu"
  BUILD_NAME: "game"
  GODOT_VERSION: "3.1"
  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 26 27 28 29 30 31 32
    - godot -v -q --path ./$BUILD_NAME --export "Linux/X11" ../build/$DEB_NAME-$DEB_VERSION/$BUILD_NAME.x64
    - ls -la ./build
    - strip --strip-unneeded --remove-section=.comment --remove-section=.note ./build/$DEB_NAME-$DEB_VERSION/$BUILD_NAME.x64
    - tar -cJf ./build/${DEB_NAME}_${DEB_VERSION}.orig.tar.xz ./build/$DEB_NAME-$DEB_VERSION/*
    - cp -v -r ./debian ./build/$DEB_NAME-$DEB_VERSION
    - mv -v ./build/$DEB_NAME-$DEB_VERSION/debian/*.desktop ./build/$DEB_NAME-$DEB_VERSION
    - cd ./build/$DEB_NAME-$DEB_VERSION
    - fakeroot dpkg-buildpackage -F
Razvan Radulescu's avatar
Razvan Radulescu committed
33
  artifacts:
Razvan Radulescu's avatar
Razvan Radulescu committed
34
    name: $DEB_NAME-$DEB_VERSION-$CI_JOB_NAME
Razvan Radulescu's avatar
Razvan Radulescu committed
35 36
    paths:
      - ./build