Skip to content

Commit 50cb8b8

Browse files
authored
Update Morello CI (#590)
* Move Morello CI to track default release - Log some details of the build environment - Remove workarounds overcome by events * Morello CI: parameterize run queue and boot env * Morello CI to run as a non-root user For reasons unrelated to snmalloc, it's become more convenient to engage in a little white lie, as it were, that the CI jobs are not `root` on the worker nodes. So I'm testing changes on the cluster orchestration goo to run the github runner as a non-root user. However, much as with GitHub's own runners, the runner user is in the `wheel`, and `root` will have no password, so we can still `su` up to `root` when needed. Of course, when we are already root, we can `su` to anyone we like, including `root`, so these changes are compatible with both the old and new world order and have been tested with both.
1 parent b9b9055 commit 50cb8b8

1 file changed

Lines changed: 34 additions & 25 deletions

File tree

‎.github/workflows/morello.yml‎

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
11
name: snmalloc CI for Morello
22

3-
# Controls when the workflow will run
43
on:
5-
# Triggers the workflow on push or pull request events but only for the master branch
4+
# Triggers the workflow on push or pull request events but only for the main branch
65
push:
76
branches: [ main ]
87
pull_request:
98
branches: [ main ]
109

1110
# Allows you to run this workflow manually from the Actions tab
1211
workflow_dispatch:
12+
inputs:
13+
bootenv_label:
14+
description: "Morello host environment"
15+
type: string
16+
required: true
17+
default: "benchmark"
18+
19+
runqueue_label:
20+
description: "Morello runner queue (production or test scripts?)"
21+
required: true
22+
type: choice
23+
options:
24+
- "msr-morello"
25+
- "msr-morello-test"
1326

1427
jobs:
1528
# UNIX-like, but with some needed TLC for the moment, so not folded in to the main unixlike CI.
@@ -25,42 +38,46 @@ jobs:
2538
include:
2639
- os: "morello"
2740
caps: Hybrid
28-
dependencies: |
29-
pkg64 install -y llvm-localbase cmake ninja
41+
dependencies: >-
42+
llvm-localbase cmake ninja
3043
cmake-flags: >
3144
-DCMAKE_CXX_COMPILER=/usr/local64/bin/clang++
3245
-DCMAKE_C_COMPILER=/usr/local64/bin/clang
3346
-DCMAKE_CXX_FLAGS='-march=morello -Xclang -morello-vararg=new'
3447
-DCMAKE_C_FLAGS='-march=morello -Xclang -morello-vararg=new'
3548
- os: "morello"
3649
caps: Purecap
37-
dependencies: |
38-
pkg64 install -y llvm-localbase cmake ninja
50+
dependencies: >-
51+
llvm-localbase cmake ninja
3952
cmake-flags: >
4053
-DCMAKE_CXX_COMPILER=/usr/local64/bin/clang++
4154
-DCMAKE_C_COMPILER=/usr/local64/bin/clang
4255
-DCMAKE_CXX_FLAGS='-march=morello -mabi=purecap -Xclang -morello-vararg=new'
4356
-DCMAKE_C_FLAGS='-march=morello -mabi=purecap -Xclang -morello-vararg=new'
44-
-DSNMALLOC_LINK_ICF=OFF
45-
# SNMALLOC_LINK_ICF=OFF until the fix for
46-
# https://git.morello-project.org/morello/llvm-project/-/issues/51 , namely
47-
# https://git.morello-project.org/morello/llvm-project/-/commit/f41cb9104e0793de87d98b38acb274b2e3266091
48-
# lands in a package or a release. That's probably the Fall 2022 release.
4957
# Don't abort runners if a single one fails
5058
fail-fast: false
5159
# Morello needs special handling to get picked up by our self-hosted runners
5260
# When/if we do integrate this back into the unixlike matrix above, we could
5361
# say something like::
5462
# runs-on: >-
55-
# ${{ (matrix.os == 'morello' && fromJSON('["self-hosted", "msr-morello", "2022.05-benchmark"]'))
63+
# ${{ (matrix.os == 'morello' && fromJSON('["self-hosted", "msr-morello", "benchmark"]'))
5664
# || matrix.os }}
5765
# to dispatch dynamically.
58-
runs-on: ["self-hosted", "msr-morello", "2022.05-benchmark"]
66+
runs-on: >-
67+
${{ fromJSON(format(
68+
'[ "self-hosted", "{0}", "{1}" ]',
69+
inputs.runqueue_label || 'msr-morello',
70+
inputs.bootenv_label || 'benchmark' )) }}
5971
name: ${{ matrix.os }} ${{ matrix.build-type }} ${{ matrix.caps }}
6072
steps:
6173
- uses: actions/checkout@v2
6274
- name: Install build dependencies
63-
run: ${{ matrix.dependencies }}
75+
run: |
76+
su -l root -c "pkg64 install -y ${{ matrix.dependencies }}"
77+
- name: Log environment details
78+
run: |
79+
uname -a
80+
mount
6481
- name: Configure CMake
6582
run: >
6683
cmake
@@ -70,24 +87,16 @@ jobs:
7087
${{ matrix.extra-cmake-flags }}
7188
# Build with a nice ninja status line
7289
- name: Build
73-
# https://github.com/ChristopherHX/github-act-runner seemingly ignores working-directory,
74-
# but everyone agrees that we start in ${{github.workspace}} by default, so just cd into
75-
# the build directory ourselves. See
76-
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
77-
# https://github.com/ChristopherHX/github-act-runner/issues/61
78-
# working-directory: ${{github.workspace}}/build
90+
working-directory: ${{github.workspace}}/build
7991
run: |
80-
cd build
8192
NINJA_STATUS="%p [%f:%s/%t] %o/s, %es" ninja
8293
- name: Test file size of binaries is sane
83-
# working-directory: ${{github.workspace}}/build
94+
working-directory: ${{github.workspace}}/build
8495
run: |
85-
cd build
8696
ls -l func-first_operation-fast ; [ $(ls -l func-first_operation-fast | awk '{ print $5}') -lt 10000000 ]
8797
# If the tests are enabled for this job, run them
8898
- name: Test
8999
if: ${{ matrix.build-only != 'yes' }}
90-
# working-directory: ${{github.workspace}}/build
100+
working-directory: ${{github.workspace}}/build
91101
run: |
92-
cd build
93102
ctest --output-on-failure -j 4 -C ${{ matrix.build-type }} --timeout 400

0 commit comments

Comments
 (0)