Skip to content
Snippets Groups Projects
.gitlab-ci-unix.yml 13.8 KiB
Newer Older
Deucе's avatar
Deucе committed
# TODO: Add support for GTK utilities
#       The bad touching needs to be solved in the build system, but
#       maybe there's a way to automate it with needs?

Deucе's avatar
Deucе committed
spec:
  inputs:
    os:
    platform:
    tagname:
    cross_platform:
      default: 'no'
    build_flags:
      default: 'RELEASE=1'
    no_javascript:
      default: 'no'
Deucе's avatar
Deucе committed
    has_curses:
      default: 'yes'
Deucе's avatar
Deucе committed
---

".$[[ inputs.os ]]":
  extends: .rules
Deucе's avatar
Deucе committed
  tags:
    - "$[[ inputs.tagname ]]"
Deucе's avatar
Deucе committed
".$[[ inputs.os ]]-build":
  stage: build
  extends: .$[[ inputs.os ]]
Deucе's avatar
Deucе committed
".$[[ inputs.os ]]-test":
  stage: test
  extends: .$[[ inputs.os ]]
"$[[ inputs.os ]]-$[[ inputs.platform ]] [spidermonkey]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd 3rdp/build
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS libmozjs
Deucе's avatar
Deucе committed
  artifacts:
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "spidermonkey-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "3rdp/*.*.*.release/mozjs"
  rules:
Deucе's avatar
Deucе committed
    - if: '"$[[ inputs.no_javascript ]]" == "yes"'
Deucе's avatar
Deucе committed
      when: never
    - !reference [.rules, rules]
"$[[ inputs.os ]]-$[[ inputs.platform ]] [cryptlib]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd 3rdp/build
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS cryptlib
Deucе's avatar
Deucе committed
  artifacts:
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "cryptlib-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "3rdp/*.*.*.release/cl"

"$[[ inputs.os ]]-$[[ inputs.platform ]] [xpdev]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd src/xpdev
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS
Deucе's avatar
Deucе committed
  artifacts:
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "xpdev-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "src/xpdev/*.*.*.lib.release*"
      - "src/xpdev/*.*.*.obj.release*/*.o*"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [encode]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd src/encode
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS
Deucе's avatar
Deucе committed
  artifacts:
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "encode-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "src/encode/*.*.*.lib.release*"
      - "src/encode/*.*.*.obj.release*/*.o*"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [hash]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd src/hash
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS
Deucе's avatar
Deucе committed
  artifacts:
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "hash-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "src/hash/*.*.*.lib.release*"
      - "src/hash/*.*.*.obj.release*/*.o*"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [ciolib]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
Deucе's avatar
Deucе committed
    - cd src/conio
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS
Deucе's avatar
Deucе committed
  artifacts:
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "ciolib-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
Deucе's avatar
Deucе committed
      - "src/conio/*.*.*.lib.release*"
      - "src/conio/*.*.*.obj.release*/*.o*"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [sftp]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd src/sftp
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS
Deucе's avatar
Deucе committed
  artifacts:
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "sftp-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "src/sftp/*.*.*.lib.release*"
      - "src/sftp/*.*.*.obj.release*/*.o*"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [smblib]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd src/smblib
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS
Deucе's avatar
Deucе committed
  artifacts:
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "smblib-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "src/smblib/*.*.*.lib.release*"
      - "src/smblib/*.*.*.obj.release*/*.o*"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [uifc]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd src/uifc
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS
Deucе's avatar
Deucе committed
  artifacts:
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "uifc-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "src/uifc/*.*.*.lib.release*"
      - "src/uifc/*.*.*.obj.release*/*.o*"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [gitinfo]":
  extends:
    - .$[[ inputs.os ]]-build
  script:
    - cd src/sbbs3
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS gitinfo
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "gitinfo-$[[ inputs.os ]]-$[[ inputs.platform ]]"
    paths:
      - "src/sbbs3/git_*.h"

"$[[ inputs.os ]]-$[[ inputs.platform ]] [scfg]":
  extends:
    - .$[[ inputs.os ]]-build
  script:
    - cd src/sbbs3/scfg
    - touch depend
    - touch xpdev
    - touch xpdev-mt
    - touch encode
    - touch hash
    - touch smblib
    - touch ciolib-mt
    - touch uifc
    - touch uifc-mt
    - touch cl
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS GIT=NO
  artifacts:
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "scfg-$[[ inputs.os ]]-$[[ inputs.platform ]]"
    paths:
      - "src/sbbs3/scfg/*.exe.release/*"
      - "src/sbbs3/scfg/*.obj.release*/*.o*"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [ciolib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [cryptlib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [encode]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [hash]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [smblib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [uifc]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [xpdev]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [gitinfo]"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [uedit]":
  extends:
    - .$[[ inputs.os ]]-build
  script:
    - cd src/sbbs3/uedit
    - touch depend
    - touch xpdev
    - touch xpdev-mt
    - touch encode
    - touch hash
    - touch smblib
    - touch ciolib-mt
    - touch uifc
    - touch uifc-mt
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS GIT=NO
  artifacts:
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "uedit-$[[ inputs.os ]]-$[[ inputs.platform ]]"
    paths:
      - "src/sbbs3/uedit/*.exe.release/*"
      - "src/sbbs3/uedit/*.obj.release*/*.o*"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [ciolib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [encode]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [hash]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [smblib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [uifc]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [xpdev]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [gitinfo]"
Deucе's avatar
Deucе committed
  rules:
Deucе's avatar
Deucе committed
    - if: '"$[[ inputs.has_curses ]]" == "no"'
Deucе's avatar
Deucе committed
      when: never
    - !reference [.rules, rules]
"$[[ inputs.os ]]-$[[ inputs.platform ]] [umonitor]":
  extends:
    - .$[[ inputs.os ]]-build
  script:
    - cd src/sbbs3/umonitor
    - touch depend
    - touch xpdev
    - touch xpdev-mt
    - touch encode
    - touch hash
    - touch smblib
    - touch ciolib-mt
    - touch uifc
    - touch uifc-mt
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS
  artifacts:
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "umonitor-$[[ inputs.os ]]-$[[ inputs.platform ]]"
    paths:
      - "src/sbbs3/umonitor/*.exe.release/*"
      - "src/sbbs3/umonitor/*.obj.release*/*.o*"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [ciolib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [encode]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [hash]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [smblib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [uifc]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [xpdev]"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [utils]":
  extends:
    - .$[[ inputs.os ]]-build
  script:
    - cd src/sbbs3
    - touch cl
    - touch depend
    - touch xpdev
    - touch xpdev-mt
    - touch encode
    - touch hash
    - touch smblib
    - touch ciolib-mt
    - touch uifc
    - touch uifc-mt
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS GIT=NO standalone-utils
    expire_in: 30 mins
Deucе's avatar
Deucе committed
    name: "utils-$[[ inputs.os ]]-$[[ inputs.platform ]]"
    paths:
      - "src/sbbs3/*.exe.release/*"
      - "src/sbbs3/*.obj.release*/*.o*"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [ciolib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [cryptlib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [encode]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [gitinfo]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [hash]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [smblib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [uifc]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [xpdev]"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [sbbs]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd src/sbbs3
    - touch depend
    - touch xpdev
    - touch xpdev-mt
    - touch smblib
    - touch uifc
    - touch uifc-mt
    - touch ciolib-mt
    - touch encode
    - touch hash
    - touch smblib
    - touch sftp-mt
    - touch cl
    - touch scfg/xpdev-mt
    - touch scfg/uifc-mt
    - touch scfg/ciolib-mt
    - touch scfg/smblib
    - touch scfg/encode
    - touch scfg/hash
    - touch scfg/cl
    - touch uedit/smblib
    - touch uedit/uifc-mt
    - touch uedit/ciolib-mt
    - touch uedit/xpdev-mt
    - touch umonitor/ciolib-mt
    - touch umonitor/uifc-mt
    - touch umonitor/xpdev-mt
    - touch umonitor/smblib
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS GIT=NO all
Deucе's avatar
Deucе committed
  artifacts:
Deucе's avatar
Deucе committed
    name: "sbbs-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "src/sbbs3/*.exe.release/*"
      - "src/sbbs3/*.lib.release/*"
      - "src/sbbs3/*/*.exe.release/*"
  needs:
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [spidermonkey]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [cryptlib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [xpdev]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [encode]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [hash]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [sftp]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [smblib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [ciolib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [uifc]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [gitinfo]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [scfg]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [uedit]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [umonitor]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [utils]"
  rules:
Deucе's avatar
Deucе committed
    - if: '"$[[ inputs.no_javascript ]]" == "yes"'
      when: never
Deucе's avatar
Deucе committed
    - if: '"$[[ inputs.cross_platform ]]" == "yes"'
Deucе's avatar
Deucе committed
      when: never
    - !reference [.rules, rules]
"$[[ inputs.os ]]-$[[ inputs.platform ]] [syncterm]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd src/syncterm
    - touch depend
    - touch xpdev
    - touch xpdev-mt
    - touch encode
    - touch hash
    - touch ciolib-mt
    - touch uifc
    - touch uifc-mt
    - touch sftp-mt
    - touch cl
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS
Deucе's avatar
Deucе committed
  artifacts:
Deucе's avatar
Deucе committed
    name: "syncterm-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "src/syncterm/*.exe.release/*"
  needs:
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [ciolib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [cryptlib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [encode]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [hash]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [sftp]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [uifc]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [xpdev]"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [syncdraw]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd src/syncdraw
    - touch depend
    - touch xpdev
    - touch xpdev-mt
    - touch ciolib-mt
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS
Deucе's avatar
Deucе committed
  artifacts:
Deucе's avatar
Deucе committed
    name: "syncdraw-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "src/syncdraw/*.exe.release/*"
  needs:
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [ciolib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [xpdev]"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [jsdoor]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd src/sbbs3
    - touch depend
    - touch xpdev
    - touch xpdev-mt
    - touch encode
    - touch hash
    - touch smblib
    - touch ciolib-mt
    - touch uifc
    - touch uifc-mt
    - touch sftp-mt
    - touch cl
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS jsdoor
Deucе's avatar
Deucе committed
  artifacts:
Deucе's avatar
Deucе committed
    name: "jsdoor-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "src/sbbs3/*.exe.release/*"
  needs:
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [ciolib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [cryptlib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [encode]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [hash]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [sftp]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [smblib]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [spidermonkey]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [uifc]"
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [xpdev]"
  rules:
Deucе's avatar
Deucе committed
    - if: '"$[[ inputs.no_javascript ]]" == "yes"'
      when: never
    - !reference [.rules, rules]
"$[[ inputs.os ]]-$[[ inputs.platform ]] [sexpots]":
  extends:
    - .$[[ inputs.os ]]-build
Deucе's avatar
Deucе committed
  script:
    - cd src/sexpots
    - touch depend
    - touch xpdev
    - touch xpdev-mt
Deucе's avatar
Deucе committed
    - gmake $[[ inputs.build_flags ]] $BUILD_ARGS
Deucе's avatar
Deucе committed
  artifacts:
Deucе's avatar
Deucе committed
    name: "sexpots-$[[ inputs.os ]]-$[[ inputs.platform ]]"
Deucе's avatar
Deucе committed
    paths:
      - "src/sexpots/*.exe.release/*"
  needs:
    - job: "$[[ inputs.os ]]-$[[ inputs.platform ]] [xpdev]"
"$[[ inputs.os ]]-$[[ inputs.platform ]] [js-testsuite]":
Deucе's avatar
Deucе committed
  extends:
    - .$[[ inputs.os ]]-test
  script:
    - "src/sbbs3/*.exe.release/jsdoor exec/tests/test.js"
  dependencies:
    - "$[[ inputs.os ]]-$[[ inputs.platform ]] [jsdoor]"
Deucе's avatar
Deucе committed
    - if: '"$[[ inputs.cross_platform ]]" == "yes"'
      when: never
Deucе's avatar
Deucе committed
    - if: '"$[[ inputs.no_javascript ]]" == "yes"'
Deucе's avatar
Deucе committed
      when: never
    - !reference [.rules, rules]