Skip to content
Open
115 changes: 115 additions & 0 deletions .github/workflows/capable-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: snmalloc CI for Morello at The Capable Hub

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: >-
cmake ninja-build
cmake-flags: >
-DCMAKE_CXX_COMPILER=/root/llvm-cheri/install/bin/clang++
-DCMAKE_C_COMPILER=/root/llvm-cheri/install/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: >-
cmake ninja-build
cmake-flags: >
-DCMAKE_ASM_COMPILER_TARGET=aarch64-unknown-linux-musl_purecap
-DCMAKE_C_COMPILER_TARGET=aarch64-unknown-linux-musl_purecap
-DCMAKE_CXX_COMPILER_TARGET=aarch64-unknown-linux-musl_purecap
-DCMAKE_CXX_COMPILER=/root/llvm-cheri/install/bin/clang++
-DCMAKE_C_COMPILER=/root/llvm-cheri/install/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: self-hosted
# runs-on: the-capable-hub-aws-ci
env:
BUILD_DIR: ${{github.workspace}}/volatile/${{ github.job }}
container:
image: capablehub/cheri-ca-llvm:19-riscv64-latest
steps:
- uses: actions/checkout@v2
- name: Log environment details
run: |
uname -a
mount
- name: Configure CMake
run: |
# ${{github.workspace}}/build
apt-get update
apt-get -yy install ${{ matrix.dependencies }}
ls -l /root
cmake --version
which clang
ls -l `which clang`
clang --version
which clang++
ls -l `which clang++`
clang++ --version
mkdir -p ./build

cmake \
-B ./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: ./build
run: |
NINJA_STATUS="%p [%f:%s/%t] %o/s, %es" ninja
- name: Test file size of binaries is sane
working-directory: ./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
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ concurrency:

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
pull_request:
branches: [ main, snmalloc1 ]
# # Triggers the workflow on push or pull request events but only for the master branch
# push:
# branches: [ main ]
# pull_request:
# branches: [ main, snmalloc1 ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/morello.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
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 ]
# # 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:
Expand Down
122 changes: 61 additions & 61 deletions .github/workflows/reusable-cmake-build.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
name: Reusable CMake Build

on:
workflow_call:
inputs:
os:
required: true
type: string
description: 'Runner OS (e.g., ubuntu-24.04, macos-14, windows-2022)'
build-type:
required: true
type: string
description: 'CMake build type (Release, Debug)'
cmake-config:
required: false
type: string
default: '-G Ninja'
description: 'CMake configuration options (-G, -A, -T, compiler flags)'
extra-cmake-flags:
required: false
type: string
default: ''
description: 'Additional CMake flags for the project'
dependencies:
required: false
type: string
default: ''
description: 'Command to install dependencies'
build-only:
required: false
type: boolean
default: false
description: 'Skip tests if true'
self-host:
required: false
type: boolean
default: false
description: 'Run self-hosting test'
check-binary-size:
required: false
type: boolean
default: true
description: 'Check binary size is reasonable'
test-exclude-pattern:
required: false
type: string
default: ''
description: 'Regex pattern for tests to exclude'
test-extra-args:
required: false
type: string
default: ''
description: 'Extra arguments for ctest'
use-msbuild:
required: false
type: boolean
default: false
description: 'Use MSBuild instead of Ninja for building'
timeout-minutes:
required: false
type: number
default: 30
description: 'Job timeout in minutes'
# on:
# workflow_call:
# inputs:
# os:
# required: true
# type: string
# description: 'Runner OS (e.g., ubuntu-24.04, macos-14, windows-2022)'
# build-type:
# required: true
# type: string
# description: 'CMake build type (Release, Debug)'
# cmake-config:
# required: false
# type: string
# default: '-G Ninja'
# description: 'CMake configuration options (-G, -A, -T, compiler flags)'
# extra-cmake-flags:
# required: false
# type: string
# default: ''
# description: 'Additional CMake flags for the project'
# dependencies:
# required: false
# type: string
# default: ''
# description: 'Command to install dependencies'
# build-only:
# required: false
# type: boolean
# default: false
# description: 'Skip tests if true'
# self-host:
# required: false
# type: boolean
# default: false
# description: 'Run self-hosting test'
# check-binary-size:
# required: false
# type: boolean
# default: true
# description: 'Check binary size is reasonable'
# test-exclude-pattern:
# required: false
# type: string
# default: ''
# description: 'Regex pattern for tests to exclude'
# test-extra-args:
# required: false
# type: string
# default: ''
# description: 'Extra arguments for ctest'
# use-msbuild:
# required: false
# type: boolean
# default: false
# description: 'Use MSBuild instead of Ninja for building'
# timeout-minutes:
# required: false
# type: number
# default: 30
# description: 'Job timeout in minutes'

jobs:
build:
Expand Down
68 changes: 34 additions & 34 deletions .github/workflows/reusable-vm-build.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
name: Reusable VM Build

on:
workflow_call:
inputs:
vm-type:
required: true
type: string
description: 'VM type (freebsd, netbsd, openbsd)'
vm-version:
required: true
type: string
description: 'VM version'
build-type:
required: true
type: string
description: 'CMake build type'
dependencies:
required: true
type: string
description: 'Commands to install dependencies'
cmake-flags:
required: false
type: string
default: ''
description: 'Additional CMake flags'
host-os:
required: false
type: string
default: 'ubuntu-22.04'
description: 'Host runner OS'
timeout-minutes:
required: false
type: number
default: 25
description: 'Job timeout in minutes'
# on:
# workflow_call:
# inputs:
# vm-type:
# required: true
# type: string
# description: 'VM type (freebsd, netbsd, openbsd)'
# vm-version:
# required: true
# type: string
# description: 'VM version'
# build-type:
# required: true
# type: string
# description: 'CMake build type'
# dependencies:
# required: true
# type: string
# description: 'Commands to install dependencies'
# cmake-flags:
# required: false
# type: string
# default: ''
# description: 'Additional CMake flags'
# host-os:
# required: false
# type: string
# default: 'ubuntu-22.04'
# description: 'Host runner OS'
# timeout-minutes:
# required: false
# type: number
# default: 25
# description: 'Job timeout in minutes'

jobs:
build:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# push:
# branches: [ main ]
# pull_request:
# branches: [ main ]

workflow_dispatch:

Expand Down
1 change: 1 addition & 0 deletions src/snmalloc/global/threadalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
# error At most one out of method of thread teardown can be specified.
# endif
# define SNMALLOC_THREAD_TEARDOWN_DEFINED
# define __cxa_thread_atexit_impl __cxa_thread_atexit
extern "C" int __cxa_thread_atexit_impl(void(func)(void*), void*, void*);
extern "C" void* __dso_handle;
#endif
Expand Down
Loading
Loading