Skip to content

Commit 9ebb551

Browse files
authored
Merge pull request #84 from MPC-SoK/add-gh-actions
Add GH Actions to build and test the Docker containers
2 parents ac52c13 + bcfbc57 commit 9ebb551

23 files changed

+350
-22
lines changed

.github/build_containers.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
3+
set -ex
4+
5+
CONTAINERS=$@
6+
7+
if [ -z "$CONTAINERS" ]; then
8+
echo "Nothing to do!"
9+
exit 0
10+
fi
11+
12+
for dirname in $CONTAINERS; do
13+
echo "building container from directory $dirname"
14+
cd "$dirname"
15+
docker build . --tag "$dirname"
16+
cd ..
17+
done
18+
19+
echo "successfully built $CONTAINERS"

.github/workflows/test-aby.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and test the Docker container for ABY
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- aby/*
8+
pull_request:
9+
branches: [ master ]
10+
paths:
11+
- aby/*
12+
13+
jobs:
14+
build:
15+
name: Build container for ABY
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v3
20+
- uses: docker/setup-buildx-action@v2
21+
- uses: docker/build-push-action@v4
22+
with:
23+
context: aby
24+
tags: aby
25+
load: true
26+
cache-from: type=gha
27+
cache-to: type=gha,mode=max
28+
push: false

.github/workflows/test-cbmc-gc.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and test the Docker container for CBMC-GC
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- cbmc-gc/*
8+
pull_request:
9+
branches: [ master ]
10+
paths:
11+
- cbmc-gc/*
12+
13+
jobs:
14+
build:
15+
name: Build container for cbmc-gc
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v3
20+
- uses: docker/setup-buildx-action@v2
21+
- uses: docker/build-push-action@v4
22+
with:
23+
context: cbmc-gc
24+
tags: cbmc-gc
25+
load: true
26+
cache-from: type=gha
27+
cache-to: type=gha,mode=max
28+
push: false

.github/workflows/test-emp.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and test the Docker container for EMP
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- emp/*
8+
pull_request:
9+
branches: [ master ]
10+
paths:
11+
- emp/*
12+
13+
jobs:
14+
build:
15+
name: Build container for EMP
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v3
20+
- uses: docker/setup-buildx-action@v2
21+
- uses: docker/build-push-action@v4
22+
with:
23+
context: emp
24+
tags: emp
25+
load: true
26+
cache-from: type=gha
27+
cache-to: type=gha,mode=max
28+
push: false

.github/workflows/test-jiff.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and test the Docker container for Jiff
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- jiff/*
8+
pull_request:
9+
branches: [ master ]
10+
paths:
11+
- jiff/*
12+
13+
jobs:
14+
build:
15+
name: Build container for Jiff
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v3
20+
- uses: docker/setup-buildx-action@v2
21+
- uses: docker/build-push-action@v4
22+
with:
23+
context: jiff
24+
tags: jiff
25+
load: true
26+
cache-from: type=gha
27+
cache-to: type=gha,mode=max
28+
push: false

.github/workflows/test-mp-spdz.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and test the Docker container for MP-SPDZ
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- mp-spdz/*
8+
pull_request:
9+
branches: [ master ]
10+
paths:
11+
- mp-spdz/*
12+
13+
jobs:
14+
build:
15+
name: Build container for MP-SPDZ
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v3
20+
- uses: docker/setup-buildx-action@v2
21+
- uses: docker/build-push-action@v4
22+
with:
23+
context: mp-spdz
24+
tags: mp-spdz
25+
load: true
26+
cache-from: type=gha
27+
cache-to: type=gha,mode=max
28+
push: false

.github/workflows/test-mpyc.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and test the Docker container for MPyC
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- mpyc/*
8+
pull_request:
9+
branches: [ master ]
10+
paths:
11+
- mpyc/*
12+
13+
jobs:
14+
build:
15+
name: Build container for MPyC
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v3
20+
- uses: docker/setup-buildx-action@v2
21+
- uses: docker/build-push-action@v4
22+
with:
23+
context: mpyc
24+
tags: mpyc
25+
load: true
26+
cache-from: type=gha
27+
cache-to: type=gha,mode=max
28+
push: false

.github/workflows/test-obliv-c.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and test the Docker container for Obliv-C
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- obliv-c/*
8+
pull_request:
9+
branches: [ master ]
10+
paths:
11+
- obliv-c/*
12+
13+
jobs:
14+
build:
15+
name: Build container for obliv-c
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v3
20+
- uses: docker/setup-buildx-action@v2
21+
- uses: docker/build-push-action@v4
22+
with:
23+
context: obliv-c
24+
tags: obliv-c
25+
load: true
26+
cache-from: type=gha
27+
cache-to: type=gha,mode=max
28+
push: false

.github/workflows/test-oblivm.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and test the Docker container for ObliVM
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- oblivm/*
8+
pull_request:
9+
branches: [ master ]
10+
paths:
11+
- oblivm/*
12+
13+
jobs:
14+
build:
15+
name: Build container for oblivm
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v3
20+
- uses: docker/setup-buildx-action@v2
21+
- uses: docker/build-push-action@v4
22+
with:
23+
context: oblivm
24+
tags: oblivm
25+
load: true
26+
cache-from: type=gha
27+
cache-to: type=gha,mode=max
28+
push: false

.github/workflows/test-picco.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and test the Docker container for Picco
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- picco/*
8+
pull_request:
9+
branches: [ master ]
10+
paths:
11+
- picco/*
12+
13+
jobs:
14+
build:
15+
name: Build container for Picco
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v3
20+
- uses: docker/setup-buildx-action@v2
21+
- uses: docker/build-push-action@v4
22+
with:
23+
context: picco
24+
tags: picco
25+
load: true
26+
cache-from: type=gha
27+
cache-to: type=gha,mode=max
28+
push: false

.github/workflows/test-scalemamba.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and test the Docker container for SCALE-Mamba
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- scalemamba/*
8+
pull_request:
9+
branches: [ master ]
10+
paths:
11+
- scalemamba/*
12+
13+
jobs:
14+
build:
15+
name: Build container for SCALE-Mamba
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v3
20+
- uses: docker/setup-buildx-action@v2
21+
- uses: docker/build-push-action@v4
22+
with:
23+
context: scalemamba
24+
tags: scalemamba
25+
load: true
26+
cache-from: type=gha
27+
cache-to: type=gha,mode=max
28+
push: false

.github/workflows/test-spdz.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and test the Docker container for SPDZ-2
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- spdz/*
8+
pull_request:
9+
branches: [ master ]
10+
paths:
11+
- spdz/*
12+
13+
jobs:
14+
build:
15+
name: Build container for SPDZ-2
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v3
20+
- uses: docker/setup-buildx-action@v2
21+
- uses: docker/build-push-action@v4
22+
with:
23+
context: spdz
24+
tags: spdz
25+
load: true
26+
cache-from: type=gha
27+
cache-to: type=gha,mode=max
28+
push: false

aby/install.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/sh
22

3+
set -e
4+
35
# get ABY
46
git clone --recursive https://github.com/encryptogroup/ABY.git
57
cd ABY
@@ -17,5 +19,5 @@ cp ~/source/geninput.py src/examples/
1719
# build ABY
1820
mkdir build && cd build
1921
cmake -DABY_BUILD_EXE=On ..
20-
make
22+
make -j
2123

cbmc-gc/install.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ git checkout -b MPCSOK e57333b19484
99

1010
# make and install cmbc-gc executables
1111
make minisat2-download
12-
make
12+
make -j2
1313

1414
cp bin/cbmc* /usr/bin/
1515
cp bin/circuit* /usr/bin/
16-
17-

emp/install.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

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

0 commit comments

Comments
 (0)