Skip to content

Commit e4f1f3e

Browse files
committed
Initial docker image creation workflows.
1 parent 6a1ad7e commit e4f1f3e

18 files changed

+201
-18
lines changed

.circleci/config.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,11 @@ defaults:
3333
3434
- run_build: &run_build
3535
name: Build
36-
command: |
37-
set -ex
38-
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" -o -n "$FORCE_RELEASE" ]; then echo -n > prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt; fi
39-
echo -n "$CIRCLE_SHA1" > commit_hash.txt
40-
mkdir -p build
41-
cd build
42-
[ -n "$COVERAGE" -a "$CIRCLE_BRANCH" != release -a -z "$CIRCLE_TAG" ] && CMAKE_OPTIONS="$CMAKE_OPTIONS -DCOVERAGE=ON"
43-
cmake .. -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} $CMAKE_OPTIONS -G "Unix Makefiles"
44-
make -j4
36+
command: scripts/ci/build.sh
4537

4638
- run_build_ossfuzz: &run_build_ossfuzz
4739
name: Build_ossfuzz
48-
command: |
49-
mkdir -p build
50-
cd build
51-
protoc --proto_path=../test/tools/ossfuzz yulProto.proto --cpp_out=../test/tools/ossfuzz
52-
protoc --proto_path=../test/tools/ossfuzz abiV2Proto.proto --cpp_out=../test/tools/ossfuzz
53-
protoc --proto_path=../test/tools/ossfuzz solProto.proto --cpp_out=../test/tools/ossfuzz
54-
cmake .. -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} $CMAKE_OPTIONS
55-
make ossfuzz ossfuzz_proto ossfuzz_abiv2 -j4
40+
command: scripts/ci/build_ossfuzz.sh
5641

5742
- run_proofs: &run_proofs
5843
name: Correctness proofs for optimization rules

.github/workflows/buildpack-deps.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: buildpack-deps
2+
3+
on:
4+
pull_request:
5+
branches: [ develop ]
6+
paths:
7+
- 'scripts/docker/buildpack-deps/Dockerfile.emscripten'
8+
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu1604.clang.ossfuzz'
9+
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu1804'
10+
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu2004.clang'
11+
- 'scripts/docker/buildpack-deps/Dockerfile.ubuntu2004'
12+
13+
jobs:
14+
buildpack-deps:
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
DOCKER_REPOSITORY: docker.pkg.github.com/${{ github.repository }}
18+
IMAGE_NAME: buildpack-deps
19+
20+
runs-on: ubuntu-latest
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
image_variant: [emscripten, ubuntu1604.clang.ossfuzz, ubuntu1804, ubuntu2004.clang, ubuntu2004]
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Upgrade ${{ env.IMAGE_NAME }}-${{ matrix.image_variant }}
33+
run: |
34+
echo "${GITHUB_TOKEN}" | docker login docker.pkg.github.com -u "${GITHUB_ACTOR}" --password-stdin
35+
scripts/ci/docker_upgrade.sh ${{ env.IMAGE_NAME }} ${{ matrix.image_variant }} ${{ env.DOCKER_REPOSITORY }}
36+
docker logout docker.pkg.github.com
37+
38+
- name: comment PR
39+
if: "env.DOCKER_IMAGE"
40+
uses: aarlt/[email protected]
41+
with:
42+
msg: "`${{ env.DOCKER_IMAGE }} ${{ env.DOCKER_REPO_DIGEST }}`."

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ prerelease.txt
3232

3333
# Build directory
3434
build/
35-
build*/
35+
/build*/
3636
emscripten_build/
3737
docs/_build
3838
__pycache__

scripts/ci/build.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
4+
ROOTDIR="$(dirname "$0")/../.."
5+
cd "${ROOTDIR}"
6+
7+
# shellcheck disable=SC2166
8+
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" -o -n "$FORCE_RELEASE" ]; then echo -n >prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" >prerelease.txt; fi
9+
if [ -n "$CIRCLE_SHA1" ]
10+
then
11+
echo -n "$CIRCLE_SHA1" >commit_hash.txt
12+
fi
13+
14+
mkdir -p build
15+
cd build
16+
17+
# shellcheck disable=SC2166
18+
[ -n "$COVERAGE" -a "$CIRCLE_BRANCH" != release -a -z "$CIRCLE_TAG" ] && CMAKE_OPTIONS="$CMAKE_OPTIONS -DCOVERAGE=ON"
19+
20+
# shellcheck disable=SC2086
21+
cmake .. -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}" $CMAKE_OPTIONS -G "Unix Makefiles"
22+
23+
make -j 4

scripts/ci/build_ossfuzz.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
ROOTDIR="$(dirname "$0")/../.."
5+
BUILDDIR="${ROOTDIR}/build"
6+
7+
mkdir -p "${BUILDDIR}"
8+
cd "${BUILDDIR}"
9+
10+
protoc --proto_path=../test/tools/ossfuzz yulProto.proto --cpp_out=../test/tools/ossfuzz
11+
protoc --proto_path=../test/tools/ossfuzz abiV2Proto.proto --cpp_out=../test/tools/ossfuzz
12+
protoc --proto_path=../test/tools/ossfuzz solProto.proto --cpp_out=../test/tools/ossfuzz
13+
cmake .. -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}" -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/libfuzzer.cmake
14+
15+
make ossfuzz ossfuzz_proto ossfuzz_abiv2 -j 4
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../scripts/travis-emscripten/build_emscripten.sh
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build_ossfuzz.sh
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build.sh
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build.sh
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build.sh

0 commit comments

Comments
 (0)