Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GH Actions to build the Docker containers #84

Merged
merged 20 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/build_containers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

set -ex

CONTAINERS=$@

if [ -z "$CONTAINERS" ]; then
echo "Nothing to do!"
exit 0
fi

for dirname in $CONTAINERS; do
echo "building container from directory $dirname"
cd "$dirname"
docker build . --tag "$dirname"
cd ..
done

echo "successfully built $CONTAINERS"
28 changes: 28 additions & 0 deletions .github/workflows/test-aby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test the Docker container for ABY

on:
push:
branches: [ master ]
paths:
- aby/*
pull_request:
branches: [ master ]
paths:
- aby/*

jobs:
build:
name: Build container for ABY
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: aby
tags: aby
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
28 changes: 28 additions & 0 deletions .github/workflows/test-cbmc-gc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test the Docker container for CBMC-GC

on:
push:
branches: [ master ]
paths:
- cbmc-gc/*
pull_request:
branches: [ master ]
paths:
- cbmc-gc/*

jobs:
build:
name: Build container for cbmc-gc
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: cbmc-gc
tags: cbmc-gc
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
28 changes: 28 additions & 0 deletions .github/workflows/test-emp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test the Docker container for EMP

on:
push:
branches: [ master ]
paths:
- emp/*
pull_request:
branches: [ master ]
paths:
- emp/*

jobs:
build:
name: Build container for EMP
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: emp
tags: emp
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
28 changes: 28 additions & 0 deletions .github/workflows/test-jiff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test the Docker container for Jiff

on:
push:
branches: [ master ]
paths:
- jiff/*
pull_request:
branches: [ master ]
paths:
- jiff/*

jobs:
build:
name: Build container for Jiff
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: jiff
tags: jiff
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
28 changes: 28 additions & 0 deletions .github/workflows/test-mp-spdz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test the Docker container for MP-SPDZ

on:
push:
branches: [ master ]
paths:
- mp-spdz/*
pull_request:
branches: [ master ]
paths:
- mp-spdz/*

jobs:
build:
name: Build container for MP-SPDZ
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: mp-spdz
tags: mp-spdz
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
28 changes: 28 additions & 0 deletions .github/workflows/test-mpyc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test the Docker container for MPyC

on:
push:
branches: [ master ]
paths:
- mpyc/*
pull_request:
branches: [ master ]
paths:
- mpyc/*

jobs:
build:
name: Build container for MPyC
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: mpyc
tags: mpyc
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
28 changes: 28 additions & 0 deletions .github/workflows/test-obliv-c.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test the Docker container for Obliv-C

on:
push:
branches: [ master ]
paths:
- obliv-c/*
pull_request:
branches: [ master ]
paths:
- obliv-c/*

jobs:
build:
name: Build container for obliv-c
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: obliv-c
tags: obliv-c
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
28 changes: 28 additions & 0 deletions .github/workflows/test-oblivm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test the Docker container for ObliVM

on:
push:
branches: [ master ]
paths:
- oblivm/*
pull_request:
branches: [ master ]
paths:
- oblivm/*

jobs:
build:
name: Build container for oblivm
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: oblivm
tags: oblivm
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
28 changes: 28 additions & 0 deletions .github/workflows/test-picco.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test the Docker container for Picco

on:
push:
branches: [ master ]
paths:
- picco/*
pull_request:
branches: [ master ]
paths:
- picco/*

jobs:
build:
name: Build container for Picco
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: picco
tags: picco
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
28 changes: 28 additions & 0 deletions .github/workflows/test-scalemamba.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test the Docker container for SCALE-Mamba

on:
push:
branches: [ master ]
paths:
- scalemamba/*
pull_request:
branches: [ master ]
paths:
- scalemamba/*

jobs:
build:
name: Build container for SCALE-Mamba
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: scalemamba
tags: scalemamba
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
28 changes: 28 additions & 0 deletions .github/workflows/test-spdz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and test the Docker container for SPDZ-2

on:
push:
branches: [ master ]
paths:
- spdz/*
pull_request:
branches: [ master ]
paths:
- spdz/*

jobs:
build:
name: Build container for SPDZ-2
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: spdz
tags: spdz
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
4 changes: 3 additions & 1 deletion aby/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

set -e

# get ABY
git clone --recursive https://github.com/encryptogroup/ABY.git
cd ABY
Expand All @@ -17,5 +19,5 @@ cp ~/source/geninput.py src/examples/
# build ABY
mkdir build && cd build
cmake -DABY_BUILD_EXE=On ..
make
make -j

4 changes: 1 addition & 3 deletions cbmc-gc/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ git checkout -b MPCSOK e57333b19484

# make and install cmbc-gc executables
make minisat2-download
make
make -j2

cp bin/cbmc* /usr/bin/
cp bin/circuit* /usr/bin/


4 changes: 2 additions & 2 deletions emp/install.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

set -e

wget https://raw.githubusercontent.com/emp-toolkit/emp-readme/master/scripts/install.py
# We don't set "-install" because our docker image already comes with the necessary dependencies.
# See: https://github.com/emp-toolkit/emp-readme/blob/master/scripts/install.py#L12
python3 install.py -install --tool --ot --sh2pc --ag2pc


Loading
Loading