Skip to content
Snippets Groups Projects
.gitlab-ci-unix.yml 29.76 KiB
# TODO: The bad touching needs to be solved in the build system, but
#       maybe there's a way to automate it with needs?
#       Build the various sbbs libraries separately as well.

spec:
  inputs:
    os:
    platform:
    tagname:
    cross_platform:
      default: 'no'
    build_flags:
      default: 'RELEASE=1'
    no_javascript:
      default: 'no'
    has_curses:
      default: 'yes'
    has_gtk:
      default: 'no'
    gnu_make:
      default: 'gmake'
---

".$[[ inputs.os ]]":
  extends: .rules
  tags:
    - "$[[ inputs.tagname ]]"

".$[[ inputs.os ]]-build":
  stage: build
  extends: .$[[ inputs.os ]]

".$[[ inputs.os ]]-test":
  stage: test
  extends: .$[[ inputs.os ]]

".$[[ inputs.os ]]-cleanup":
  stage: cleanup
  extends: .$[[ inputs.os ]]

"$[[ inputs.os ]]-$[[ inputs.platform ]] [spidermonkey]":
  extends:
    - .$[[ inputs.os ]]-build
  script:
    - cd 3rdp/build
    - touch depend
    - JS_CONFIGURE_ARGS="--cache-file=../../../../../build/smconfig.cache" $[[ inputs.gnu_make ]] $[[ inputs.build_flags ]] $BUILD_ARGS libmozjs
    - mkdir -p "/tmp/gitlab-runner/$[[ inputs.os ]]-$[[ inputs.platform ]]-${CI_PIPELINE_ID}"
    - cd ../..
    - tar -czf "/tmp/gitlab-runner/$[[ inputs.os ]]-$[[ inputs.platform ]]-${CI_PIPELINE_ID}/spidermonkey.tgz" 3rdp/*.release/mozjs
  rules:
    - if: '"$[[ inputs.no_javascript ]]" == "yes"'
      when: never
    - !reference [.rules, rules]
  cache:
    key: $CI_JOB_NAME
    paths:
      - 3rdp/build/smconfig.cache*

"$[[ inputs.os ]]-$[[ inputs.platform ]] [cryptlib]":
  extends:
    - .$[[ inputs.os ]]-build
  script:
    - cd 3rdp/build
    - touch depend
    - $[[ inputs.gnu_make ]] $[[ inputs.build_flags ]] FIXED_FIXED_SEED=1 $BUILD_ARGS cryptlib
    - mkdir -p "/tmp/gitlab-runner/$[[ inputs.os ]]-$[[ inputs.platform ]]-${CI_PIPELINE_ID}"
    - cd ../..
    - tar -czf "/tmp/gitlab-runner/$[[ inputs.os ]]-$[[ inputs.platform ]]-${CI_PIPELINE_ID}/cryptlib.tgz" 3rdp/*.release/cl
  needs: []