Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment with Semaphore CI 2.0 #2972

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: v1.0
name: LDC
agent:
machine:
type: e1-standard-8
os_image: ubuntu1804

blocks:
- name: "Semaphore 2.0"
task:
env_vars:
- name: HOST_LDC_VERSION
value: "1.14.0"
jobs:
- name: Build and test
commands:
- checkout || true
- git submodule update --init
# Install prerequisites
- export DEBIAN_FRONTEND=noninteractive
- sudo dpkg --add-architecture i386
- sudo apt-get -q update
- |
sudo apt-get -yq install \
cmake ninja-build g++-multilib \
llvm-dev zlib1g-dev libclang-common-6.0-dev \
libcurl4 libcurl4:i386 \
curl gdb python-pip tzdata unzip zip
- export CC="gcc-7"
- export CXX="g++-7"
- sudo update-alternatives --install /usr/bin/ld ld /usr/bin/ld.gold 99
- pip install --user lit
- python -c "import lit; lit.main();" --version | head -n 1
- curl -L -o ldc2.tar.xz https://github.com/ldc-developers/ldc/releases/download/v$HOST_LDC_VERSION/ldc2-$HOST_LDC_VERSION-linux-x86_64.tar.xz
- mkdir host-ldc
- tar -xf ldc2.tar.xz --strip 1 -C host-ldc
- rm ldc2.tar.xz
# Build LDC & LDC D unittests & defaultlib unittest runners
- cmake --version
- ninja --version
- mkdir build
- cd build
- |
cmake -G Ninja .. \
-DCMAKE_BUILD_TYPE=Release \
-DD_COMPILER=$PWD/../host-ldc/bin/ldmd2 \
-DMULTILIB=ON \
-DLDC_INSTALL_LTOPLUGIN=ON \
-DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON
- ninja -j8 all ldc2-unittest all-test-runners
- bin/ldc2 -version
# Run LDC D unittests
- ctest --output-on-failure -R ldc2-unittest
# Run LIT testsuite
- ctest -V -R lit-tests
# Run DMD testsuite
- DMD_TESTSUITE_MAKE_ARGS=-j8 ctest -V -R dmd-testsuite
# Run defaultlib unittests & druntime stand-alone tests
- ctest -j8 --output-on-failure -E "ldc2-unittest|lit-tests|dmd-testsuite"