File: shippable.yml

package info (click to toggle)
ldc 1:1.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 80,880 kB
  • sloc: ansic: 123,899; cpp: 84,038; sh: 1,402; makefile: 1,083; asm: 919; objc: 65; exp: 30; python: 22
file content (169 lines) | stat: -rw-r--r-- 6,451 bytes parent folder | download
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
language: c

compiler:
  - gcc

runtime:
  nodePool: shippable_shared_aarch64

env:
  global:
    - secure: RQ6gpJFPBDGVlnz+ZzSgeMpkcnvcA/7Lzyj/r06fMFR5iOz2cYaImCekNRw2PlhYQ+0FCQ119TLMKNOa7OUu6XxUp5LZtq7pSB6QLe3RB3YysFsosNPlY/wyyRsrW9ICEbDP/X8kPcfrDtOPGS/dGIwgeo0+R4Yl0OLDK9GrExEY45bWgvuLqoWDO89pi31kBk5LG5MAYhHZ0UTdboi5A2GRT0T8M0kr53jBRka8FGkbncXfHp9+/6IjTVJoUduRkdsk0A9RN1KRoao6rtrBNNvwIStc6zxJSOHszoaTp/K/ucGC4InZl/9GHPS/Y78SGKn7YJv3tGmcGzqAxrVaXQ==
  matrix:
    - LLVM_VERSION=7.0.0
      EXTRA_CMAKE_FLAGS="-DBUILD_LTO_LIBS=ON -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -DLDC_INSTALL_LTOPLUGIN=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=aarch64"
      DUB_VERSION=v1.11.0

build:
  ci:
    - export DEBIAN_FRONTEND=noninteractive
    - apt-get -q update
    # libconfig-dev needed for ltsmaster only
    - |
      apt-get -yq install \
        git-core cmake ninja-build \
        libconfig-dev libcurl4-openssl-dev zlib1g-dev \
        libcurl3 \
        curl gdb p7zip-full python-pip tzdata unzip zip
    - pip install --user lit
    - update-alternatives --install /usr/bin/ld ld /usr/bin/ld.gold 99
    # Install LDC-flavoured LLVM
    - |
      assertsSuffix=""
      if [ "$IS_GIT_TAG" = "false" ]; then
        echo "Using LLVM with enabled assertions"
        assertsSuffix="-withAsserts"
      fi
      curl -L -o llvm.tar.xz https://github.com/ldc-developers/llvm/releases/download/ldc-v$LLVM_VERSION/llvm-$LLVM_VERSION-linux-aarch64$assertsSuffix.tar.xz
      mkdir llvm && tar -xf llvm.tar.xz --strip 1 -C llvm
      rm llvm.tar.xz
    # Build ltsmaster for bootstrapping
    - git checkout -b _backup
    - git checkout ltsmaster
    - git submodule update
    - mkdir build-ltsmaster
    - cd build-ltsmaster
    - |
      cmake -G Ninja \
        -DCMAKE_BUILD_TYPE=Release \
        -DLLVM_ROOT_DIR=$PWD/../llvm \
        -DCMAKE_INSTALL_PREFIX=$PWD/../ldc-ltsmaster \
        ..
    - ninja install
    - cd ..
    - ldc-ltsmaster/bin/ldc2 --version
    # Build actual version, for another bootstrapping step
    - git checkout _backup
    - git submodule update
    - mkdir build-bootstrap
    - cd build-bootstrap
    - |
      cmake -G Ninja \
        -DCMAKE_BUILD_TYPE=Release \
        -DLLVM_ROOT_DIR=$PWD/../llvm \
        -DCMAKE_INSTALL_PREFIX=$PWD/../ldc-bootstrap \
        -DD_COMPILER=$PWD/../ldc-ltsmaster/bin/ldmd2 \
        ..
    - ninja -j32 install
    - cd ..
    - ldc-bootstrap/bin/ldc2 --version
    # Build with itself
    - export LDC_INSTALL_DIR=$PWD/ldc2-aarch64
    - mkdir build
    - cd build
    - |
      cmake -G Ninja \
        -DCMAKE_BUILD_TYPE=Release \
        -DLLVM_ROOT_DIR=$PWD/../llvm \
        -DCMAKE_INSTALL_PREFIX=$LDC_INSTALL_DIR \
        -DINCLUDE_INSTALL_DIR=$LDC_INSTALL_DIR/import \
        -DD_COMPILER=$PWD/../ldc-bootstrap/bin/ldmd2 \
        $EXTRA_CMAKE_FLAGS \
        ..
    - ninja -j32
    - bin/ldc2 --version
    # Build druntime/Phobos unittest runners
    - ninja -j16 all-test-runners
    # Build and run LDC D unittests
    - ctest --output-on-failure -R ldc2-unittest
    # Run LIT testsuite
    - ctest -V -R lit-tests || true
    # Run DMD testsuite (non-debug only for now)
    - DMD_TESTSUITE_MAKE_ARGS='-j16 -k' ctest -V -R dmd-testsuite -E "-debug$" || true
    # Run druntime/Phobos unittests (non-debug only for now)
    - ctest -j16 --output-on-failure -E "dmd-testsuite|ldc2-unittest|lit-tests|-debug(-shared)?$" || true
    # Install LDC
    - ninja install
    - cd ..
    - perl -pi -e s?$LDC_INSTALL_DIR/?%%ldcbinarypath%%/../?g $LDC_INSTALL_DIR/etc/ldc2.conf
    - cp LICENSE $LDC_INSTALL_DIR
    - git clone https://github.com/ldc-developers/ldc-scripts.git
    - cp ldc-scripts/ldc2-packaging/pkgfiles/README $LDC_INSTALL_DIR
    # Now rename the installation dir to test portability.
    - |
      NEW_LDC_INSTALL_DIR=$PWD/ldc2-install
      mv $LDC_INSTALL_DIR $NEW_LDC_INSTALL_DIR
      export LDC_INSTALL_DIR=$NEW_LDC_INSTALL_DIR
    # Hello world integration test with shared libs
    - echo 'void main() { import std.stdio; writeln("Hello world, ", size_t.sizeof * 8, " bits"); }' > hello.d
    - $LDC_INSTALL_DIR/bin/ldc2 hello.d -of=hello -link-defaultlib-shared
    - ./hello
    # Hello world integration test with LTO
    - $LDC_INSTALL_DIR/bin/ldc2 hello.d -of=hello_thin -flto=thin -defaultlib=phobos2-ldc-lto,druntime-ldc-lto
    - ./hello_thin
    - $LDC_INSTALL_DIR/bin/ldc2 hello.d -of=hello_full -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto
    - ./hello_full
    # Dynamic-compile integration test
    - $LDC_INSTALL_DIR/bin/ldc2 -enable-dynamic-compile -run tests/dynamiccompile/array.d
    # Build dub
    - export DMD=$LDC_INSTALL_DIR/bin/ldmd2
    - git clone --recursive https://github.com/dlang/dub.git
    - cd dub
    - git checkout $DUB_VERSION
    - |
      if [ "$IS_GIT_TAG" = "false" ]; then
        # FIXME: dub is built with `-g -O`, which leads to issue #2361 with enabled
        # assertions, at least on Linux. So strip `-g` for untagged builds.
        perl -pi -e "s? -g -O ? -O ?g" build.sh
      fi
    - ./build.sh
    - cp bin/dub $LDC_INSTALL_DIR/bin
    - cd ..
    # Build dlang tools
    - git clone --recursive https://github.com/dlang/tools.git dlang-tools
    - cd dlang-tools
    - |
      make -f posix.mak -j16 install \
        DMD=$LDC_INSTALL_DIR/bin/ldmd2 \
        DMD_DIR=$PWD/../tests/d2 \
        DFLAGS="-w -de" \
        INSTALL_DIR=$PWD
    - cp bin/{rdmd,ddemangle,dustmite} $LDC_INSTALL_DIR/bin
    - cd ..
    # Pack installation dir
    - |
      if [ "$IS_GIT_TAG" = "false" ]; then
        artifactBasename="ldc2-${COMMIT:0:8}-linux-aarch64-$(date "+%Y%m%d")"
      else
        artifactBasename="ldc2-${GIT_TAG_NAME:1}-linux-aarch64"
      fi
      export LDC_ARTIFACT=$artifactBasename.tar.xz
      mv $LDC_INSTALL_DIR $artifactBasename
      tar -cf - $artifactBasename | 7za a $LDC_ARTIFACT -si -txz -mx9 -mmt=8
    - ls -l $LDC_ARTIFACT
    # Upload to GitHub if tagged or on the master branch
    - |
      if [ "$IS_GIT_TAG" = "true" ]; then
        tools/upload-to-github.sh $GIT_TAG_NAME $LDC_ARTIFACT
      elif [[ "$IS_PULL_REQUEST" = "false" && "$BRANCH" = "master" ]]; then
        tools/upload-to-github.sh CI $LDC_ARTIFACT
      fi

integrations:
  notifications:
    - integrationName: email
      type: email
      on_success: never
      on_failure: never
      on_cancel: never
      on_pull_request: never