Skip to content

Commit 4d23a00

Browse files
authored
Merge pull request oasisprotocol#2108 from oasisprotocol/kostko/feature/rofl-tdx-containers
Add rofl-containers generic ROFL app runtime for containers
2 parents faa6349 + a9a712c commit 4d23a00

File tree

31 files changed

+2154
-80
lines changed

31 files changed

+2154
-80
lines changed

.github/actions/lint-rust/action.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ inputs:
1111
features:
1212
description: Features to enable, separated by comma
1313
required: false
14+
exclude:
15+
description: Packages to exclude, separated by comma
16+
required: false
1417
runs:
1518
using: composite
1619
steps:
@@ -19,15 +22,26 @@ runs:
1922
env:
2023
MANIFEST_PATH: ${{ inputs.manifest_path }}
2124
FEATURES: ${{ inputs.features }}
25+
EXCLUDE: ${{ inputs.exclude }}
2226
run: |
2327
if [[ -z "$FEATURES" ]]; then
2428
FEATURES_ARG=("--all-features")
2529
else
2630
FEATURES_ARG=("--features" "$FEATURES")
2731
fi
2832
33+
if [[ -z "$EXCLUDE" ]]; then
34+
EXCLUDE_ARG=("")
35+
else
36+
EXCLUDE_ARG=("--workspace")
37+
for PKG in ${EXCLUDE//,/ }; do
38+
EXCLUDE_ARG+=("--exclude" "$PKG")
39+
done
40+
fi
41+
2942
cargo clippy \
3043
${FEATURES_ARG[@]} \
44+
${EXCLUDE_ARG[@]} \
3145
--locked \
3246
--manifest-path "$MANIFEST_PATH" \
3347
-- \

.github/workflows/ci-lint.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,16 @@ jobs:
3232
run: rustup show
3333

3434
- name: Lint Rust code
35+
uses: ./.github/actions/lint-rust
36+
with:
37+
features: debug-logging,test,unsafe-allow-debug
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
40+
- name: Lint Rust code (mock TEE)
3541
uses: ./.github/actions/lint-rust
3642
with:
3743
features: debug-logging,debug-mock-sgx,test,unsafe-allow-debug
44+
exclude: rofl-containers,rofl-appd
3845
token: ${{ secrets.GITHUB_TOKEN }}
3946

4047
- name: Lint Rust code (TDX)

.github/workflows/ci-test.yaml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,20 @@ jobs:
6161
- name: Install dependencies
6262
run: |
6363
sudo apt-get update
64-
sudo apt-get install gcc-multilib clang-11
64+
sudo apt-get install gcc-multilib clang-18
6565
6666
- name: Set up Rust
6767
run: rustup show
6868

69-
- name: Build for SGX
70-
run: cargo build --target x86_64-fortanix-unknown-sgx
69+
- name: Build select crates for SGX
70+
run: |
71+
cargo build --target x86_64-fortanix-unknown-sgx \
72+
--package oasis-runtime-sdk \
73+
--package oasis-runtime-sdk-contracts \
74+
--package oasis-runtime-sdk-evm
7175
env:
7276
CFLAGS_x86_64_fortanix_unknown_sgx: -isystem/usr/include/x86_64-linux-gnu -mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening
73-
CC_x86_64_fortanix_unknown_sgx: clang-11
77+
CC_x86_64_fortanix_unknown_sgx: clang-18
7478

7579
check-core-versions:
7680
# NOTE: This name appears in GitHub's Checks API.
@@ -304,6 +308,12 @@ jobs:
304308
- name: Checkout code
305309
uses: actions/checkout@v4
306310

311+
- name: Disable AppArmor
312+
run: |
313+
sudo systemctl stop apparmor.service
314+
sudo systemctl disable apparmor.service
315+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
316+
307317
- name: Set up Node.js LTS
308318
uses: actions/setup-node@v4
309319
with:
@@ -383,6 +393,12 @@ jobs:
383393
- name: Checkout code
384394
uses: actions/checkout@v4
385395

396+
- name: Disable AppArmor
397+
run: |
398+
sudo systemctl stop apparmor.service
399+
sudo systemctl disable apparmor.service
400+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
401+
386402
- name: Set up Rust
387403
run: rustup show
388404

@@ -493,6 +509,12 @@ jobs:
493509
- name: Checkout code
494510
uses: actions/checkout@v4
495511

512+
- name: Disable AppArmor
513+
run: |
514+
sudo systemctl stop apparmor.service
515+
sudo systemctl disable apparmor.service
516+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
517+
496518
- name: Set up Rust
497519
run: rustup show
498520

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: release-rofl-containers
2+
3+
on:
4+
push:
5+
tags:
6+
- 'rofl-containers/v[0-9]+.[0-9]+*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release-rofl-containers:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Build rofl-containers
19+
id: build
20+
uses: oasisprotocol/oasis-sdk/.github/actions/hash-rust@main
21+
with:
22+
image: ghcr.io/oasisprotocol/runtime-builder:main
23+
pkg-dirs: rofl-containers
24+
binaries: rofl-containers
25+
clean: no
26+
27+
- name: Publish the release
28+
uses: ncipollo/release-action@v1
29+
with:
30+
artifacts: ${{ github.workspace }}/${{ steps.build.outputs.build-path }}/rofl-containers
31+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)