File: .drone.star

package info (click to toggle)
simde 0.7.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 28,284 kB
  • sloc: ansic: 410,189; sh: 174; makefile: 41; python: 26
file content (118 lines) | stat: -rw-r--r-- 3,578 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# -*- Python -*-
# Drone CI Starlark configuration file.
# https://docs.drone.io/pipeline/scripting/starlark/
# Run `drone starlark convert --stdout` to verify `.drone.star`.

def main(ctx):
  jobs = []

  for arch in ['aarch64', 'armv8', 'armv7']:
    drone_arch = 'arm'
    if arch == 'aarch64':
      drone_arch = 'arm64'

    for compiler in ['gcc', 'clang']:
      cc = compiler
      cxx = compiler + '++'
      compiler_flags = []
      packages = ['ninja-build', 'git-core', 'python3-pip', 'gcovr']

      if arch == 'armv7':
        compiler_flags.extend(['-march=armv7-a', '-mfpu=neon'])
      elif arch == 'armv8':
        compiler_flags.extend(['-march=armv8-a', '-mfpu=neon'])
      elif arch == 'aarch64':
        compiler_flags.extend(['-march=armv8-a+simd+crypto+crc'])

      if compiler == 'gcc':
        cxx = 'g++'
        compiler_flags.extend(['-Wextra', '-Werror'])
        packages.extend(['gcc', 'g++'])
      elif compiler == 'clang':
        compiler_flags.extend(['-Weverything', '-Werror'])
        packages.extend(['clang'])

      cflags = ' '.join(compiler_flags)
      cxxflags = ' '.join(compiler_flags)

      environment = {
        "CC": cc,
        "CXX": cxx,
        "CFLAGS": cflags,
        "CXXFLAGS": cxxflags,
        "DEBIAN_FRONTEND": "noninteractive",
      }

      exclude_branches = ['master']
      for provider in ['gha', 'cirrus', 'semaphore', 'circleci', 'appveyor', 'azure', 'travis']:
        exclude_branches.append('ci/' + provider)
        exclude_branches.append('ci/' + provider + '/**')

      jobs.append({
        "kind": "pipeline",
        "type": "docker",
        "name": compiler + ' ' + arch,
        "platform": {
          "os": "linux",
          "arch": drone_arch
        },
        "steps": [
          {
            "name": "test",
            "image": "ubuntu:bionic",
            "environment": environment,
            "commands": [
              "cat /proc/cpuinfo",
              "apt-get update -y",
              "apt-get install -y " + " ".join(packages),
              "pip3 install meson",
              "meson build -Db_coverage=true || (cat build/meson-logs/meson-log.txt; false)",
              "ninja -C build -v test",
            ],
          }
        ],
        "trigger": {
          "branch": {
            "exclude": exclude_branches
          }
        },
      })

  # jobs.append({
  #   "kind": "pipeline",
  #   "type": "docker",
  #   "name": "native aliases",
  #   "platform": {
  #     "os": "linux",
  #     "arch": "arm64"
  #   },
  #   "steps": [
  #     {
  #       "name": "test",
  #       "image": "ubuntu:bionic",
  #       "environment": {
  #         "CC": "clang",
  #         "CXX": "clang++",
  #         "CFLAGS": "-march=armv8a+simd+crypto+crc -Weverything -Wextra -DSIMDE_ENABLE_NATIVE_ALIASES -DSIMDE_NATIVE_ALIASES_TESTING",
  #         "CXXFLAGS": "-march=armv8a+simd+crypto+crc -Weverything -Wextra -DSIMDE_ENABLE_NATIVE_ALIASES -DSIMDE_NATIVE_ALIASES_TESTING",
  #       "DEBIAN_FRONTEND": "noninteractive",
  #       },
  #       "commands": [
  #         "cat /proc/cpuinfo",
  #         "apt-get update -y",
  #         "apt-get install -y " + " ".join(['ninja-build', 'git-core', 'python3-pip', 'gcovr', 'clang', 'curl']),
  #         "pip3 install meson",
  #         "(cd test && sh -x ./native-aliases.sh)",
  #         "meson build -Db_coverage=true",
  #         "ninja -C build -v test",
  #       ],
  #     },
  #   ],
  #   "trigger": {
  #     "branch": {
  #       "exclude": exclude_branches
  #     }
  #   }
  # })

  return jobs