From cbc39af224656ed11996ed6d747e4f46515fe6a5 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 09:52:49 +0100 Subject: [PATCH 01/18] test ga --- .github/workflows/build-action.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/build-action.yml diff --git a/.github/workflows/build-action.yml b/.github/workflows/build-action.yml new file mode 100644 index 0000000..57a22a9 --- /dev/null +++ b/.github/workflows/build-action.yml @@ -0,0 +1,25 @@ +name: Docker Image CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + name: Build containers for modified frameworks + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v3 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v41.0.1 + with: + dir_names: "true" + - name: test changed files + run: echo ${{ steps.changed-files.outputs.all_changed_files }} + + - name: Build the Docker image + run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) \ No newline at end of file From a1f1ab13a994ad90d0a93dc87c699ce99e02e103 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 09:55:23 +0100 Subject: [PATCH 02/18] include branch --- .github/workflows/build-action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-action.yml b/.github/workflows/build-action.yml index 57a22a9..59644ab 100644 --- a/.github/workflows/build-action.yml +++ b/.github/workflows/build-action.yml @@ -2,7 +2,7 @@ name: Docker Image CI on: push: - branches: [ master ] + branches: [ master, ci-test ] pull_request: branches: [ master ] From 3eaad5cb65dd04f8e8375d329c90c07a220f3638 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 10:11:12 +0100 Subject: [PATCH 03/18] finalise action --- .github/build_containers.sh | 17 +++++++++++++++++ ...-action.yml => build-changed-frameworks.yml} | 6 +++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 .github/build_containers.sh rename .github/workflows/{build-action.yml => build-changed-frameworks.yml} (71%) diff --git a/.github/build_containers.sh b/.github/build_containers.sh new file mode 100755 index 0000000..6a79318 --- /dev/null +++ b/.github/build_containers.sh @@ -0,0 +1,17 @@ +#!/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 \ No newline at end of file diff --git a/.github/workflows/build-action.yml b/.github/workflows/build-changed-frameworks.yml similarity index 71% rename from .github/workflows/build-action.yml rename to .github/workflows/build-changed-frameworks.yml index 59644ab..2077783 100644 --- a/.github/workflows/build-action.yml +++ b/.github/workflows/build-changed-frameworks.yml @@ -18,8 +18,12 @@ jobs: uses: tj-actions/changed-files@v41.0.1 with: dir_names: "true" + dir_names_exclude_current_dir: "true" + dir_names_max_depth: '1' + files_ignore: | + .github/*/* - name: test changed files run: echo ${{ steps.changed-files.outputs.all_changed_files }} - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) \ No newline at end of file + run: .github/build_containers.sh ${{ steps.changed-files.outputs.all_changed_files }} \ No newline at end of file From a74ac9f6be086b3282dbf197dafa899a8b932f1f Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 10:12:28 +0100 Subject: [PATCH 04/18] change something --- .github/workflows/build-changed-frameworks.yml | 1 + mpyc/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-changed-frameworks.yml b/.github/workflows/build-changed-frameworks.yml index 2077783..fdc97e2 100644 --- a/.github/workflows/build-changed-frameworks.yml +++ b/.github/workflows/build-changed-frameworks.yml @@ -22,6 +22,7 @@ jobs: dir_names_max_depth: '1' files_ignore: | .github/*/* + .github/* - name: test changed files run: echo ${{ steps.changed-files.outputs.all_changed_files }} diff --git a/mpyc/requirements.txt b/mpyc/requirements.txt index 52b8877..fb011a8 100644 --- a/mpyc/requirements.txt +++ b/mpyc/requirements.txt @@ -1,3 +1,3 @@ mpyc==0.9 gmpy2 -numpy \ No newline at end of file +numpy From ac7f111f6996d60627f334274837ec318b5ae171 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 10:19:17 +0100 Subject: [PATCH 05/18] improve buildscript --- .github/build_containers.sh | 4 +++- .github/workflows/build-changed-frameworks.yml | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/build_containers.sh b/.github/build_containers.sh index 6a79318..e250820 100755 --- a/.github/build_containers.sh +++ b/.github/build_containers.sh @@ -14,4 +14,6 @@ for dirname in $CONTAINERS; do cd "$dirname" docker build . --tag "$dirname" cd .. -done \ No newline at end of file +done + +echo "successfully built $CONTAINERS" diff --git a/.github/workflows/build-changed-frameworks.yml b/.github/workflows/build-changed-frameworks.yml index fdc97e2..994e952 100644 --- a/.github/workflows/build-changed-frameworks.yml +++ b/.github/workflows/build-changed-frameworks.yml @@ -1,8 +1,8 @@ -name: Docker Image CI +name: Build modified Docker containers on: push: - branches: [ master, ci-test ] + branches: [ master ] pull_request: branches: [ master ] @@ -27,4 +27,4 @@ jobs: run: echo ${{ steps.changed-files.outputs.all_changed_files }} - name: Build the Docker image - run: .github/build_containers.sh ${{ steps.changed-files.outputs.all_changed_files }} \ No newline at end of file + run: .github/build_containers.sh ${{ steps.changed-files.outputs.all_changed_files }} From f16e2dec76174927c804af4520cd6a200bc4ebca Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 10:39:20 +0100 Subject: [PATCH 06/18] establisj jiff workflow --- .github/workflows/test-jiff.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/test-jiff.yml diff --git a/.github/workflows/test-jiff.yml b/.github/workflows/test-jiff.yml new file mode 100644 index 0000000..05e70bd --- /dev/null +++ b/.github/workflows/test-jiff.yml @@ -0,0 +1,28 @@ +name: Build and test the Docker container for Jiff + +env: + FRAMEWORK: jiff + +on: + push: + branches: [ master ] + paths: + - '$FRAMEWORK/*' + pull_request: + branches: [ master ] + +jobs: + build: + name: Build container for $FRAMEWORK + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v3 + - uses: docker/build-push-action@v4 + with: + context: $FRAMEWORK + tags: $FRAMEWORK + load: true + cache-from: type=gha + cache-to: type=gha,mode=max + push: false From 5041b92cbb4466531183570cad4688cedd0c6085 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 10:39:40 +0100 Subject: [PATCH 07/18] changes to jiff --- jiff/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jiff/README.md b/jiff/README.md index b1afd85..aa43bbd 100644 --- a/jiff/README.md +++ b/jiff/README.md @@ -4,8 +4,7 @@ ## Docker setup -Create a Docker image. This will take a few minutes. You only have to do this -once. +Create a Docker image. This will take a few minutes. You only have to do this once. ``` $ docker build -t jiff . ``` From b64d671d06dbee5fbd7e92ac2068c46b21759699 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 10:40:37 +0100 Subject: [PATCH 08/18] test --- .github/workflows/test-jiff.yml | 2 +- jiff/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-jiff.yml b/.github/workflows/test-jiff.yml index 05e70bd..ee3f43c 100644 --- a/.github/workflows/test-jiff.yml +++ b/.github/workflows/test-jiff.yml @@ -7,7 +7,7 @@ on: push: branches: [ master ] paths: - - '$FRAMEWORK/*' + - $FRAMEWORK/* pull_request: branches: [ master ] diff --git a/jiff/README.md b/jiff/README.md index aa43bbd..79fcae4 100644 --- a/jiff/README.md +++ b/jiff/README.md @@ -6,11 +6,11 @@ Create a Docker image. This will take a few minutes. You only have to do this once. ``` -$ docker build -t jiff . +docker build -t jiff . ``` Spin up a Docker container from the image. ``` -$ docker run -it --rm jiff +docker run -it --rm jiff ``` Please note that any changes you make in the container are not persistent. From bbf91d0d367e1c478497632112a2b6d8b1a7b1b7 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 10:43:08 +0100 Subject: [PATCH 09/18] jiff changes --- .github/workflows/test-jiff.yml | 11 ++++------- jiff/README.md | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-jiff.yml b/.github/workflows/test-jiff.yml index ee3f43c..1261d6e 100644 --- a/.github/workflows/test-jiff.yml +++ b/.github/workflows/test-jiff.yml @@ -1,27 +1,24 @@ name: Build and test the Docker container for Jiff -env: - FRAMEWORK: jiff - on: push: branches: [ master ] paths: - - $FRAMEWORK/* + - jiff/* pull_request: branches: [ master ] jobs: build: - name: Build container for $FRAMEWORK + name: Build container for Jiff runs-on: ubuntu-latest steps: - name: Check out the repo uses: actions/checkout@v3 - uses: docker/build-push-action@v4 with: - context: $FRAMEWORK - tags: $FRAMEWORK + context: jiff + tags: jiff load: true cache-from: type=gha cache-to: type=gha,mode=max diff --git a/jiff/README.md b/jiff/README.md index 79fcae4..b099d89 100644 --- a/jiff/README.md +++ b/jiff/README.md @@ -37,8 +37,8 @@ Run the Docker container. We implemented three examples, `mult3`, `innerprod`, a To run tests, execute ``` -$ cd ~/jiff -$ npm run-script test-demo -- demos/ +cd ~/jiff +npm run-script test-demo -- demos/ ``` Note that the `xtabs` test is relatively slow to execute. From 7381b0f8f5a05b980efe06a904539ca9fdafbfb2 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 10:44:44 +0100 Subject: [PATCH 10/18] setuo buildx --- .../workflows/build-changed-frameworks.yml | 30 ------------------- .github/workflows/test-jiff.yml | 1 + jiff/README.md | 4 +-- 3 files changed, 3 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/build-changed-frameworks.yml diff --git a/.github/workflows/build-changed-frameworks.yml b/.github/workflows/build-changed-frameworks.yml deleted file mode 100644 index 994e952..0000000 --- a/.github/workflows/build-changed-frameworks.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Build modified Docker containers - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - name: Build containers for modified frameworks - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v3 - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v41.0.1 - with: - dir_names: "true" - dir_names_exclude_current_dir: "true" - dir_names_max_depth: '1' - files_ignore: | - .github/*/* - .github/* - - name: test changed files - run: echo ${{ steps.changed-files.outputs.all_changed_files }} - - - name: Build the Docker image - run: .github/build_containers.sh ${{ steps.changed-files.outputs.all_changed_files }} diff --git a/.github/workflows/test-jiff.yml b/.github/workflows/test-jiff.yml index 1261d6e..795b75f 100644 --- a/.github/workflows/test-jiff.yml +++ b/.github/workflows/test-jiff.yml @@ -15,6 +15,7 @@ jobs: 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 diff --git a/jiff/README.md b/jiff/README.md index b099d89..e419466 100644 --- a/jiff/README.md +++ b/jiff/README.md @@ -44,8 +44,8 @@ Note that the `xtabs` test is relatively slow to execute. To run interactively in the browser, first run the server node ``` -$ cd ~/jiff -$ node demos//server.js +cd ~/jiff +node demos//server.js ``` This starts a server on the Docker localhost. To find the correct IP address, find the docker container name and inspect it to find the correct IP. Run this on your host machine (not in your Docker container): From d9a0bc1f5ff74ca5bd093e80aa5c3bd79a24611f Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 10:51:10 +0100 Subject: [PATCH 11/18] GH actionf for ABY and CBMC-GC --- .github/workflows/test-aby.yml | 26 ++++++++++++++++++++++++++ .github/workflows/test-cbmc-gc.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/test-aby.yml create mode 100644 .github/workflows/test-cbmc-gc.yml diff --git a/.github/workflows/test-aby.yml b/.github/workflows/test-aby.yml new file mode 100644 index 0000000..22e2611 --- /dev/null +++ b/.github/workflows/test-aby.yml @@ -0,0 +1,26 @@ +name: Build and test the Docker container for ABY + +on: + push: + branches: [ master ] + paths: + - aby/* + pull_request: + branches: [ master ] + +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 diff --git a/.github/workflows/test-cbmc-gc.yml b/.github/workflows/test-cbmc-gc.yml new file mode 100644 index 0000000..1220237 --- /dev/null +++ b/.github/workflows/test-cbmc-gc.yml @@ -0,0 +1,26 @@ +name: Build and test the Docker container for CBMC-GC + +on: + push: + branches: [ master ] + paths: + - cbmc-gc/* + pull_request: + branches: [ master ] + +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 From fb3e32b0ee0382294ffa10fb7d54903f2b272464 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 10:56:27 +0100 Subject: [PATCH 12/18] Add WF for EMP --- .github/workflows/test-emp.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/test-emp.yml diff --git a/.github/workflows/test-emp.yml b/.github/workflows/test-emp.yml new file mode 100644 index 0000000..6f98c0b --- /dev/null +++ b/.github/workflows/test-emp.yml @@ -0,0 +1,26 @@ +name: Build and test the Docker container for EMP + +on: + push: + branches: [ master ] + paths: + - emp/* + pull_request: + branches: [ master ] + +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 From 44ea79394a931cf611420b31e1735dbd419cfef1 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 10:58:08 +0100 Subject: [PATCH 13/18] only run on changed dir contents --- .github/workflows/test-aby.yml | 2 ++ .github/workflows/test-cbmc-gc.yml | 2 ++ .github/workflows/test-emp.yml | 2 ++ .github/workflows/test-jiff.yml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/.github/workflows/test-aby.yml b/.github/workflows/test-aby.yml index 22e2611..c825aef 100644 --- a/.github/workflows/test-aby.yml +++ b/.github/workflows/test-aby.yml @@ -7,6 +7,8 @@ on: - aby/* pull_request: branches: [ master ] + paths: + - aby/* jobs: build: diff --git a/.github/workflows/test-cbmc-gc.yml b/.github/workflows/test-cbmc-gc.yml index 1220237..f7df05b 100644 --- a/.github/workflows/test-cbmc-gc.yml +++ b/.github/workflows/test-cbmc-gc.yml @@ -7,6 +7,8 @@ on: - cbmc-gc/* pull_request: branches: [ master ] + paths: + - cbmc-gc/* jobs: build: diff --git a/.github/workflows/test-emp.yml b/.github/workflows/test-emp.yml index 6f98c0b..ee7e641 100644 --- a/.github/workflows/test-emp.yml +++ b/.github/workflows/test-emp.yml @@ -7,6 +7,8 @@ on: - emp/* pull_request: branches: [ master ] + paths: + - emp/* jobs: build: diff --git a/.github/workflows/test-jiff.yml b/.github/workflows/test-jiff.yml index 795b75f..03d6680 100644 --- a/.github/workflows/test-jiff.yml +++ b/.github/workflows/test-jiff.yml @@ -7,6 +7,8 @@ on: - jiff/* pull_request: branches: [ master ] + paths: + - jiff/* jobs: build: From 2b25460bd0050c70a543e730f9d33e695dcc3de6 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 11:02:34 +0100 Subject: [PATCH 14/18] add MP-SPDZ WF --- .github/workflows/test-mp-spdz.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/test-mp-spdz.yml diff --git a/.github/workflows/test-mp-spdz.yml b/.github/workflows/test-mp-spdz.yml new file mode 100644 index 0000000..d636cdd --- /dev/null +++ b/.github/workflows/test-mp-spdz.yml @@ -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 From c2b0a95c21e98c2bdab10cb5fa02c2c125c43813 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 11:13:41 +0100 Subject: [PATCH 15/18] parallise cuild scripts --- aby/install.sh | 2 +- cbmc-gc/install.sh | 2 +- emp/install.sh | 4 ++-- mp-spdz/install.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aby/install.sh b/aby/install.sh index 0e11b03..cc4ece8 100644 --- a/aby/install.sh +++ b/aby/install.sh @@ -17,5 +17,5 @@ cp ~/source/geninput.py src/examples/ # build ABY mkdir build && cd build cmake -DABY_BUILD_EXE=On .. -make +make -j diff --git a/cbmc-gc/install.sh b/cbmc-gc/install.sh index 513ece4..e6894bf 100644 --- a/cbmc-gc/install.sh +++ b/cbmc-gc/install.sh @@ -9,7 +9,7 @@ git checkout -b MPCSOK e57333b19484 # make and install cmbc-gc executables make minisat2-download -make +make -j cp bin/cbmc* /usr/bin/ cp bin/circuit* /usr/bin/ diff --git a/emp/install.sh b/emp/install.sh index af94106..505c196 100644 --- a/emp/install.sh +++ b/emp/install.sh @@ -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 - - diff --git a/mp-spdz/install.sh b/mp-spdz/install.sh index 8830f32..f48dfd9 100755 --- a/mp-spdz/install.sh +++ b/mp-spdz/install.sh @@ -12,7 +12,7 @@ if [ $fromsource = "yes" ]; then git checkout v$MP_SPDZ_VERSION make setup - make all + make all -j else curl -L https://github.com/data61/MP-SPDZ/releases/download/v$MP_SPDZ_VERSION/mp-spdz-$MP_SPDZ_VERSION.tar.xz | tar xJv mv mp-spdz-$MP_SPDZ_VERSION MP-SPDZ From 9643e6010aca96ce82a6dcbc5d0208c482710ae2 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 11:20:58 +0100 Subject: [PATCH 16/18] ci: mpyc, obliv-c, oblivm --- .github/workflows/test-mpyc.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/test-obliv-c.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/test-oblivm.yml | 28 ++++++++++++++++++++++++++++ aby/install.sh | 2 ++ obliv-c/install.sh | 1 + oblivm/install.sh | 1 + 6 files changed, 88 insertions(+) create mode 100644 .github/workflows/test-mpyc.yml create mode 100644 .github/workflows/test-obliv-c.yml create mode 100644 .github/workflows/test-oblivm.yml diff --git a/.github/workflows/test-mpyc.yml b/.github/workflows/test-mpyc.yml new file mode 100644 index 0000000..8ace49f --- /dev/null +++ b/.github/workflows/test-mpyc.yml @@ -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 diff --git a/.github/workflows/test-obliv-c.yml b/.github/workflows/test-obliv-c.yml new file mode 100644 index 0000000..e062fff --- /dev/null +++ b/.github/workflows/test-obliv-c.yml @@ -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 diff --git a/.github/workflows/test-oblivm.yml b/.github/workflows/test-oblivm.yml new file mode 100644 index 0000000..7cd9aa8 --- /dev/null +++ b/.github/workflows/test-oblivm.yml @@ -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 diff --git a/aby/install.sh b/aby/install.sh index cc4ece8..e9147d3 100644 --- a/aby/install.sh +++ b/aby/install.sh @@ -1,5 +1,7 @@ #!/bin/sh +set -e + # get ABY git clone --recursive https://github.com/encryptogroup/ABY.git cd ABY diff --git a/obliv-c/install.sh b/obliv-c/install.sh index 2a40b30..c2b73ae 100644 --- a/obliv-c/install.sh +++ b/obliv-c/install.sh @@ -1,4 +1,5 @@ #!/bin/sh + set -ex git clone https://github.com/samee/obliv-c diff --git a/oblivm/install.sh b/oblivm/install.sh index 46b4b2c..ee1d305 100644 --- a/oblivm/install.sh +++ b/oblivm/install.sh @@ -10,3 +10,4 @@ git checkout -b MPCSOK 50ed0fbb556a157c0c85440dabf141a3cf7384c5 patch -p1 < ../real.patch ./compile.sh + From 7795065a890ee61f1cee737d525c581d196b032b Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 11:36:59 +0100 Subject: [PATCH 17/18] ci: picco, scalemamba, spdz --- .github/workflows/test-picco.yml | 28 +++++++++++++++++++++++++++ .github/workflows/test-scalemamba.yml | 28 +++++++++++++++++++++++++++ .github/workflows/test-spdz.yml | 28 +++++++++++++++++++++++++++ picco/install_examples.sh | 2 +- scalemamba/install.sh | 4 +++- spdz/install.sh | 6 ++---- 6 files changed, 90 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/test-picco.yml create mode 100644 .github/workflows/test-scalemamba.yml create mode 100644 .github/workflows/test-spdz.yml diff --git a/.github/workflows/test-picco.yml b/.github/workflows/test-picco.yml new file mode 100644 index 0000000..6898945 --- /dev/null +++ b/.github/workflows/test-picco.yml @@ -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 diff --git a/.github/workflows/test-scalemamba.yml b/.github/workflows/test-scalemamba.yml new file mode 100644 index 0000000..b9e6f54 --- /dev/null +++ b/.github/workflows/test-scalemamba.yml @@ -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 diff --git a/.github/workflows/test-spdz.yml b/.github/workflows/test-spdz.yml new file mode 100644 index 0000000..7e43df4 --- /dev/null +++ b/.github/workflows/test-spdz.yml @@ -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 diff --git a/picco/install_examples.sh b/picco/install_examples.sh index 3ee293a..3ffbbb1 100644 --- a/picco/install_examples.sh +++ b/picco/install_examples.sh @@ -10,5 +10,5 @@ for DIR in mult3 innerprod xtabs; do ln -s /root/keys secure_server/keys ln -s /root/picco/compute/smc-compute smc-compute picco $DIR.c smc_config $DIR utility_config - make + make -j done diff --git a/scalemamba/install.sh b/scalemamba/install.sh index 634a398..0db16f2 100644 --- a/scalemamba/install.sh +++ b/scalemamba/install.sh @@ -1,3 +1,5 @@ +#!/bin/bash + set -ex @@ -7,7 +9,7 @@ git clone https://github.com/KULeuven-COSIC/SCALE-MAMBA.git cd SCALE-MAMBA git checkout -b v1.14 c111516e3ebc1efd12a2bd47dd2122b160e13d1e cp /root/source/CONFIG.mine . -make progs +make progs -j # set up certificate authority touch ~/.rnd # see: https://github.com/openssl/openssl/issues/7754 diff --git a/spdz/install.sh b/spdz/install.sh index ab741e4..e74cee5 100644 --- a/spdz/install.sh +++ b/spdz/install.sh @@ -6,13 +6,11 @@ set -ex git clone https://github.com/bristolcrypto/SPDZ-2 cd SPDZ-2 git checkout v0.0.3 -echo USE_NTL = 1 >> CONFIG.mine -echo MOD = -DMAX_MOD_SZ=6 >> CONFIG.mine -echo ARCH = -march=native >> CONFIG.mine +{ echo USE_NTL = 1; echo MOD = -DMAX_MOD_SZ=6; echo ARCH = -march=native; } >> CONFIG.mine sed -i s/-Werror//g CONFIG # needed because recent versions of gcc cannot compile SPDZ w/o warnings. sed -i s/python/python2/g compile.py # The command is now called "python2" instead of "python". -make -j8 +make -j mkdir Player-Data From bcfbc57a835d77dfd80a072cbe77dfda7db4106a Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Mon, 29 Jan 2024 11:44:57 +0100 Subject: [PATCH 18/18] make cbmcgc build take less memory --- cbmc-gc/install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cbmc-gc/install.sh b/cbmc-gc/install.sh index e6894bf..487f363 100644 --- a/cbmc-gc/install.sh +++ b/cbmc-gc/install.sh @@ -9,9 +9,7 @@ git checkout -b MPCSOK e57333b19484 # make and install cmbc-gc executables make minisat2-download -make -j +make -j2 cp bin/cbmc* /usr/bin/ cp bin/circuit* /usr/bin/ - -