Skip to content

Commit

Permalink
Adding musl support
Browse files Browse the repository at this point in the history
In this commit, musl is enabled and LibOS suite is run twice.
  • Loading branch information
aniket-intelx authored and jinengandhi-intel committed Dec 7, 2021
1 parent 73a3ce5 commit a757320
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 10 deletions.
5 changes: 3 additions & 2 deletions ci/linux-direct-ubuntu20.04-gcc-release.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ node(node_label) {
try {
stage('checkout'){
dir ('./') {
git url: 'https://github.com/jinengandhi-intel/graphene_local_ci.git'
git url: 'https://github.com/jinengandhi-intel/graphene_local_ci.git'
}

dir ("gramine") {
git url: 'https://github.com/gramineproject/gramine.git' }
git url: 'https://github.com/gramineproject/gramine.git'
}
}

dir ("gramine") {
Expand Down
3 changes: 2 additions & 1 deletion ci/linux-sgx-centos8.2-gcc-release.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ node (node_label) {
}

dir ("gramine") {
git url: 'https://github.com/gramineproject/gramine.git' }
git url: 'https://github.com/gramineproject/gramine.git'
}
}

dir ("gramine") {
Expand Down
3 changes: 2 additions & 1 deletion ci/linux-sgx-ubuntu20.04-gcc-release.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ node(node_label) {
}

dir ("gramine") {
git url: 'https://github.com/gramineproject/gramine.git' }
git url: 'https://github.com/gramineproject/gramine.git'
}
}

dir ("gramine") {
Expand Down
7 changes: 5 additions & 2 deletions ci/stage-build-nosgx.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
stage('build') {

if (env.CC == 'clang') {
env.MESON_OPTIONS += ' -Dmusl=disabled'
}
script {
if (env.build_type == "manual") {
try {
Expand All @@ -10,7 +12,8 @@ stage('build') {
-Dskeleton=enabled \
-Ddirect=enabled \
-Dtests=enabled \
-Dsgx=disabled > meson_cmd_output.txt
-Dsgx=disabled \
$MESON_OPTIONS > meson_cmd_output.txt
ninja -vC build > ninja_build_log.txt
ninja -vC build install > ninja_install_log.txt
'''
Expand Down
13 changes: 9 additions & 4 deletions ci/stage-build-sgx.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
stage('build') {

if (env.CC == 'clang') {
env.MESON_OPTIONS += ' -Dmusl=disabled'
}
sh '''
cd "$WORKSPACE"
openssl genrsa -3 -out Pal/src/host/Linux-SGX/signer/enclave-key.pem 3072
Expand All @@ -26,7 +28,8 @@ stage('build') {
-Ddirect=disabled \
-Dsgx=enabled \
-Dtests=enabled \
-Dsgx_driver=oot > meson_cmd_output.txt
-Dsgx_driver=oot \
$MESON_OPTIONS > meson_cmd_output.txt
ninja -vC build > ninja_build_log.txt
ninja -vC build install > ninja_install_log.txt
'''
Expand All @@ -53,7 +56,8 @@ stage('build') {
-Ddirect=disabled \
-Dsgx=enabled \
-Dtests=enabled \
-Dsgx_driver=dcap1.6 > meson_cmd_output.txt
-Dsgx_driver=dcap1.6 \
$MESON_OPTIONS > meson_cmd_output.txt
ninja -vC build > ninja_build_log.txt
ninja -vC build install > ninja_install_log.txt
'''
Expand All @@ -73,7 +77,8 @@ stage('build') {
--buildtype="$BUILDTYPE" \
-Ddirect=disabled \
-Dtests=enabled \
-Dsgx=enabled > meson_cmd_output.txt
-Dsgx=enabled \
$MESON_OPTIONS > meson_cmd_output.txt
ninja -vC build > ninja_build_log.txt
ninja -vC build install > ninja_install_log.txt
'''
Expand Down
21 changes: 21 additions & 0 deletions ci/stage-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,27 @@ stage('test') {
junit 'LibOS/shim/test/regression/libos-regression.xml'
}

if (env.CC != "clang") {
timeout(time: 15, unit: 'MINUTES') {
try {
sh '''
export GRAMINE_MUSL=1
cd LibOS/shim/test/regression
# For some unknown reason it fails without this clean on sgx-18.04 pipeline
gramine-test clean
RA_CLIENT_SPID=${ra_client_spid} gramine-test -n tests_musl.toml build -v
python3 -m pytest -v --junit-xml libos-regression-musl.xml
'''
} catch (Exception e){
env.build_ok = false
sh 'echo "LibOS Test with musl Failed"'
}
finally {
junit 'LibOS/shim/test/regression/libos-regression-musl.xml'
}
}
}

try {
timeout(time: 15, unit: 'MINUTES') {
sh '''
Expand Down
2 changes: 2 additions & 0 deletions ci/ubuntu18.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install -y \
libpixman-1-dev \
libipsec-mb-dev \
linux-headers-4.15.0-20-generic \
musl \
musl-tools \
net-tools \
netcat-openbsd \
ninja-build \
Expand Down
2 changes: 2 additions & 0 deletions ci/ubuntu20.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install -y \
libjudy-dev \
libpixman-1-dev \
libipsec-mb-dev \
musl \
musl-tools \
net-tools \
netcat-openbsd \
ninja-build \
Expand Down
2 changes: 2 additions & 0 deletions ci/ubuntu21.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install -y \
libjudy-dev \
libpixman-1-dev \
libipsec-mb-dev \
musl \
musl-tools \
net-tools \
netcat-openbsd \
ninja-build \
Expand Down

0 comments on commit a757320

Please sign in to comment.