forked from microsoft/snmalloc
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (98 loc) · 3.76 KB
/
morello.yml
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
name: snmalloc CI for Morello
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
bootenv_label:
description: "Morello host environment"
type: string
required: true
default: "benchmark"
runqueue_label:
description: "Morello runner queue (production or test scripts?)"
required: true
type: choice
options:
- "msr-morello"
- "msr-morello-test"
jobs:
# UNIX-like, but with some needed TLC for the moment, so not folded in to the main unixlike CI.
# Morello can't easily self-host since it mixes purecap and hybrid build tools.
# We point cmake at the LLVM Clang frontend explicitly lest it pick up the more magic wrappers.
morello:
strategy:
matrix:
# Build each combination of OS and release/debug variants
os: [ "morello" ]
build-type: [ Release, Debug ]
caps: [ Hybrid, Purecap ]
include:
- os: "morello"
caps: Hybrid
dependencies: >-
llvm-localbase cmake ninja
cmake-flags: >
-DCMAKE_CXX_COMPILER=/usr/local64/bin/clang++
-DCMAKE_C_COMPILER=/usr/local64/bin/clang
-DCMAKE_CXX_FLAGS='-march=morello -Xclang -morello-vararg=new'
-DCMAKE_C_FLAGS='-march=morello -Xclang -morello-vararg=new'
- os: "morello"
caps: Purecap
dependencies: >-
llvm-localbase cmake ninja
cmake-flags: >
-DCMAKE_CXX_COMPILER=/usr/local64/bin/clang++
-DCMAKE_C_COMPILER=/usr/local64/bin/clang
-DCMAKE_CXX_FLAGS='-march=morello -mabi=purecap -Xclang -morello-vararg=new'
-DCMAKE_C_FLAGS='-march=morello -mabi=purecap -Xclang -morello-vararg=new'
# Don't abort runners if a single one fails
fail-fast: false
# Morello needs special handling to get picked up by our self-hosted runners
# When/if we do integrate this back into the unixlike matrix above, we could
# say something like::
# runs-on: >-
# ${{ (matrix.os == 'morello' && fromJSON('["self-hosted", "msr-morello", "benchmark"]'))
# || matrix.os }}
# to dispatch dynamically.
runs-on: >-
${{ fromJSON(format(
'[ "self-hosted", "{0}", "{1}" ]',
inputs.runqueue_label || 'msr-morello',
inputs.bootenv_label || 'benchmark' )) }}
name: ${{ matrix.os }} ${{ matrix.build-type }} ${{ matrix.caps }}
steps:
- uses: actions/checkout@v2
- name: Install build dependencies
run: |
su -l root -c "pkg64 install -y ${{ matrix.dependencies }}"
- name: Log environment details
run: |
uname -a
mount
- name: Configure CMake
run: >
cmake
-B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{matrix.build-type}}
-G Ninja ${{ matrix.cmake-flags }}
${{ matrix.extra-cmake-flags }}
# Build with a nice ninja status line
- name: Build
working-directory: ${{github.workspace}}/build
run: |
NINJA_STATUS="%p [%f:%s/%t] %o/s, %es" ninja
- name: Test file size of binaries is sane
working-directory: ${{github.workspace}}/build
run: |
ls -l func-first_operation-fast ; [ $(ls -l func-first_operation-fast | awk '{ print $5}') -lt 10000000 ]
# If the tests are enabled for this job, run them
- name: Test
if: ${{ matrix.build-only != 'yes' }}
working-directory: ${{github.workspace}}/build
run: |
ctest --output-on-failure -j 4 -C ${{ matrix.build-type }} --timeout 400