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.
This commit is contained in:
committed by
GitHub
parent
b9b9055bbf
commit
50cb8b88fe
59
.github/workflows/morello.yml
vendored
59
.github/workflows/morello.yml
vendored
@@ -1,8 +1,7 @@
|
|||||||
name: snmalloc CI for Morello
|
name: snmalloc CI for Morello
|
||||||
|
|
||||||
# Controls when the workflow will run
|
|
||||||
on:
|
on:
|
||||||
# Triggers the workflow on push or pull request events but only for the master branch
|
# Triggers the workflow on push or pull request events but only for the main branch
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -10,6 +9,20 @@ on:
|
|||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
workflow_dispatch:
|
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:
|
jobs:
|
||||||
# UNIX-like, but with some needed TLC for the moment, so not folded in to the main unixlike CI.
|
# UNIX-like, but with some needed TLC for the moment, so not folded in to the main unixlike CI.
|
||||||
@@ -25,8 +38,8 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: "morello"
|
- os: "morello"
|
||||||
caps: Hybrid
|
caps: Hybrid
|
||||||
dependencies: |
|
dependencies: >-
|
||||||
pkg64 install -y llvm-localbase cmake ninja
|
llvm-localbase cmake ninja
|
||||||
cmake-flags: >
|
cmake-flags: >
|
||||||
-DCMAKE_CXX_COMPILER=/usr/local64/bin/clang++
|
-DCMAKE_CXX_COMPILER=/usr/local64/bin/clang++
|
||||||
-DCMAKE_C_COMPILER=/usr/local64/bin/clang
|
-DCMAKE_C_COMPILER=/usr/local64/bin/clang
|
||||||
@@ -34,33 +47,37 @@ jobs:
|
|||||||
-DCMAKE_C_FLAGS='-march=morello -Xclang -morello-vararg=new'
|
-DCMAKE_C_FLAGS='-march=morello -Xclang -morello-vararg=new'
|
||||||
- os: "morello"
|
- os: "morello"
|
||||||
caps: Purecap
|
caps: Purecap
|
||||||
dependencies: |
|
dependencies: >-
|
||||||
pkg64 install -y llvm-localbase cmake ninja
|
llvm-localbase cmake ninja
|
||||||
cmake-flags: >
|
cmake-flags: >
|
||||||
-DCMAKE_CXX_COMPILER=/usr/local64/bin/clang++
|
-DCMAKE_CXX_COMPILER=/usr/local64/bin/clang++
|
||||||
-DCMAKE_C_COMPILER=/usr/local64/bin/clang
|
-DCMAKE_C_COMPILER=/usr/local64/bin/clang
|
||||||
-DCMAKE_CXX_FLAGS='-march=morello -mabi=purecap -Xclang -morello-vararg=new'
|
-DCMAKE_CXX_FLAGS='-march=morello -mabi=purecap -Xclang -morello-vararg=new'
|
||||||
-DCMAKE_C_FLAGS='-march=morello -mabi=purecap -Xclang -morello-vararg=new'
|
-DCMAKE_C_FLAGS='-march=morello -mabi=purecap -Xclang -morello-vararg=new'
|
||||||
-DSNMALLOC_LINK_ICF=OFF
|
|
||||||
# SNMALLOC_LINK_ICF=OFF until the fix for
|
|
||||||
# https://git.morello-project.org/morello/llvm-project/-/issues/51 , namely
|
|
||||||
# https://git.morello-project.org/morello/llvm-project/-/commit/f41cb9104e0793de87d98b38acb274b2e3266091
|
|
||||||
# lands in a package or a release. That's probably the Fall 2022 release.
|
|
||||||
# Don't abort runners if a single one fails
|
# Don't abort runners if a single one fails
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
# Morello needs special handling to get picked up by our self-hosted runners
|
# 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
|
# When/if we do integrate this back into the unixlike matrix above, we could
|
||||||
# say something like::
|
# say something like::
|
||||||
# runs-on: >-
|
# runs-on: >-
|
||||||
# ${{ (matrix.os == 'morello' && fromJSON('["self-hosted", "msr-morello", "2022.05-benchmark"]'))
|
# ${{ (matrix.os == 'morello' && fromJSON('["self-hosted", "msr-morello", "benchmark"]'))
|
||||||
# || matrix.os }}
|
# || matrix.os }}
|
||||||
# to dispatch dynamically.
|
# to dispatch dynamically.
|
||||||
runs-on: ["self-hosted", "msr-morello", "2022.05-benchmark"]
|
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 }}
|
name: ${{ matrix.os }} ${{ matrix.build-type }} ${{ matrix.caps }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: ${{ matrix.dependencies }}
|
run: |
|
||||||
|
su -l root -c "pkg64 install -y ${{ matrix.dependencies }}"
|
||||||
|
- name: Log environment details
|
||||||
|
run: |
|
||||||
|
uname -a
|
||||||
|
mount
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: >
|
run: >
|
||||||
cmake
|
cmake
|
||||||
@@ -70,24 +87,16 @@ jobs:
|
|||||||
${{ matrix.extra-cmake-flags }}
|
${{ matrix.extra-cmake-flags }}
|
||||||
# Build with a nice ninja status line
|
# Build with a nice ninja status line
|
||||||
- name: Build
|
- name: Build
|
||||||
# https://github.com/ChristopherHX/github-act-runner seemingly ignores working-directory,
|
working-directory: ${{github.workspace}}/build
|
||||||
# but everyone agrees that we start in ${{github.workspace}} by default, so just cd into
|
|
||||||
# the build directory ourselves. See
|
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
|
|
||||||
# https://github.com/ChristopherHX/github-act-runner/issues/61
|
|
||||||
# working-directory: ${{github.workspace}}/build
|
|
||||||
run: |
|
run: |
|
||||||
cd build
|
|
||||||
NINJA_STATUS="%p [%f:%s/%t] %o/s, %es" ninja
|
NINJA_STATUS="%p [%f:%s/%t] %o/s, %es" ninja
|
||||||
- name: Test file size of binaries is sane
|
- name: Test file size of binaries is sane
|
||||||
# working-directory: ${{github.workspace}}/build
|
working-directory: ${{github.workspace}}/build
|
||||||
run: |
|
run: |
|
||||||
cd build
|
|
||||||
ls -l func-first_operation-fast ; [ $(ls -l func-first_operation-fast | awk '{ print $5}') -lt 10000000 ]
|
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
|
# If the tests are enabled for this job, run them
|
||||||
- name: Test
|
- name: Test
|
||||||
if: ${{ matrix.build-only != 'yes' }}
|
if: ${{ matrix.build-only != 'yes' }}
|
||||||
# working-directory: ${{github.workspace}}/build
|
working-directory: ${{github.workspace}}/build
|
||||||
run: |
|
run: |
|
||||||
cd build
|
|
||||||
ctest --output-on-failure -j 4 -C ${{ matrix.build-type }} --timeout 400
|
ctest --output-on-failure -j 4 -C ${{ matrix.build-type }} --timeout 400
|
||||||
|
|||||||
Reference in New Issue
Block a user