-
Notifications
You must be signed in to change notification settings - Fork 18
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
Optimize build and release pipelines #557
Changes from 78 commits
720cfc2
9dcf921
8a2d90a
3262ce4
24bd4a3
b4481d1
9a7b88a
90a8ccf
7312669
7527f17
9d45b8d
68199ea
8b9375b
48e7bb5
d017d03
978d789
c529773
659578b
47fb5cc
191a71f
eefe533
053fa7b
daad110
beed0d2
e7db9d5
a4804fc
1f4e861
2c31ab7
b71fc6c
24cb827
4af1e8f
90161c9
ddeed97
67380ff
13885a1
9d54cb0
e017340
a79f88e
6acf97a
1f5a57c
23a407c
2d82bf2
74c8723
0a80c82
eb1384c
2e91e59
be0b2ed
683e4b0
9c1a7ae
aae8b65
1331118
e19ae70
2bd7a46
66ba934
1b81535
74b6fd9
118bef1
099f777
12a8ad9
9b614c9
07b09a2
83388b8
820301f
472ae7f
cda49af
b8ae20d
55a6368
22fadda
83f378b
275e3b0
97f0c9b
b0054b4
742152f
0c15daf
f13527d
dc40987
49f6d21
bb50d9c
2c49ec7
c6f113b
25fc200
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,169 +1,244 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
name: Build on ubuntu | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
push: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
release: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
types: [published] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
branches: [master] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
push: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
branches: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- master | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
concurrency: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
cancel-in-progress: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
build: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
container: falkordb/falkordb-build:latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
services: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
registry: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
image: registry:2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
ports: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- 5000:5000 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
strategy: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
fail-fast: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
matrix: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
platform: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- linux/amd64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- linux/arm64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
ARCH_SUFFIX: ${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Safe dir | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: git config --global --add safe.directory '*' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Safe dir | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: git config --global --add safe.directory '*' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- uses: actions/checkout@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
set-safe-directory: '*' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
submodules: recursive | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Cache GraphBLAS ${{ matrix.platform }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if: github.event_name == 'push' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
id: cache_graphblas | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/cache@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
path: /FalkorDB/bin/linux-${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }}-release/GraphBLAS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
key: graphblas-${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }}-${{ hashFiles('./deps/GraphBLAS/Include/GraphBLAS.h') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Cache parser ${{ matrix.platform }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if: github.event_name == 'push' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
id: cache_parser | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/cache@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
path: /FalkorDB/bin/linux-${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }}-release/libcypher-parser | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
key: parser-${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }}-${{ hashFiles('./deps/libcypher-parser/lib/src/parser.c') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Cache search ${{ matrix.platform }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if: github.event_name == 'push' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
id: cache_search | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/cache@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
path: /FalkorDB/bin/linux-${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }}-release/search-static | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
key: search-${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }}-${{ hashFiles('./deps/RediSearch/src/version.h') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Make sure the working directory is static between runs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
# and always the same for the CMake cache | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Relocate source | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
mkdir -p /FalkorDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
mv $GITHUB_WORKSPACE/* /FalkorDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Set up QEMU | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/setup-qemu-action@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Set up Docker Buildx | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/setup-buildx-action@v2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Login to Docker Hub | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/login-action@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
username: ${{ secrets.DOCKER_USERNAME }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
password: ${{ secrets.DOCKER_PASSWORD }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Build and push | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
id: build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/build-push-action@v5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
context: /FalkorDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
file: /FalkorDB/build/docker/Dockerfile | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
platforms: ${{ matrix.platform }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputs: type=image,name=falkordb/falkordb,push-by-digest=true,name-canonical=true,push=true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Export digest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
mkdir -p /tmp/digests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
digest="${{ steps.build.outputs.digest }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
touch "/tmp/digests/${digest#sha256:}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Upload digest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/upload-artifact@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
name: digests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
path: /tmp/digests/* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if-no-files-found: error | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
retention-days: 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Copy bin from docker on PUSH | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if: github.event_name == 'push' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
working-directory: /FalkorDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
id=$(docker create --platform=${{ matrix.platform }} falkordb/falkordb@${{ steps.build.outputs.digest }}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker cp $id:/FalkorDB/bin . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker rm -v $id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
merge: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
needs: build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Download digests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/download-artifact@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- uses: actions/checkout@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
name: digests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
path: /tmp/digests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Set up Docker Buildx | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/setup-buildx-action@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Login to Docker Hub | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/login-action@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
set-safe-directory: "*" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
submodules: recursive | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Cache compiler image ${{ matrix.platform }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
id: cache_compiler_image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/cache@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
username: ${{ secrets.DOCKER_USERNAME }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
password: ${{ secrets.DOCKER_PASSWORD }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Create manifest list and push on PUSH | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if: github.event_name == 'push' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
working-directory: /tmp/digests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker buildx imagetools create -t falkordb/falkordb:${{ github.ref_name == 'master' && 'master -t falkordb/falkordb:edge' || github.ref_name }} \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
$(printf 'falkordb/falkordb@sha256:%s ' *) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Create manifest list and push on RELEASE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if: github.event_name == 'release' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
working-directory: /tmp/digests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
path: /tmp/falkordb-compiler-${{ env.ARCH_SUFFIX }}.tar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
key: falkordb-compiler-${{ env.ARCH_SUFFIX }}-${{ hashFiles('./build/docker/Dockerfile.compiler') }}-${{ hashFiles('./deps/GraphBLAS/Include/GraphBLAS.h') }}-${{ hashFiles('./deps/libcypher-parser/lib/src/parser.c') }}-${{ hashFiles('./deps/RediSearch/src/version.h') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Make sure the working directory is static between runs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
# and always the same for the CMake cache | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Relocate source | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker buildx imagetools create -t falkordb/falkordb:${{ github.event.release.tag_name }} -t falkordb/falkordb:latest \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
$(printf 'falkordb/falkordb@sha256:%s ' *) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Inspect image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
mkdir -p /FalkorDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
mv $GITHUB_WORKSPACE/* /FalkorDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Set up QEMU | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/setup-qemu-action@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Set up Docker Buildx | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/setup-buildx-action@v2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
# network=host driver-opt needed to push to local registry | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
driver-opts: network=host | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Build compiler image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if: steps.cache_compiler_image.outputs.cache-hit == false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
id: build_compiler | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/build-push-action@v5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
context: /FalkorDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
file: /FalkorDB/build/docker/Dockerfile.compiler | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
platforms: ${{ matrix.platform }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
tags: localhost:5000/falkordb/falkordb-compiler | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputs: type=docker,dest=/tmp/falkordb-compiler-${{ env.ARCH_SUFFIX }}.tar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
# push: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
build-args: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
TARGETPLATFORM=${{ matrix.platform }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Building the compiler image conditionally based on cache hit status is efficient. However, ensure that the - # push: true
+ push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Push compiler image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker buildx imagetools inspect falkordb/falkordb:latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker load --input /tmp/falkordb-compiler-${{ env.ARCH_SUFFIX }}.tar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker push localhost:5000/falkordb/falkordb-compiler | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Build tests image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/build-push-action@v5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
context: . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
file: /FalkorDB/tests/Dockerfile | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputs: type=docker,dest=/tmp/falkordb-tests-${{ env.ARCH_SUFFIX }}.tar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
tags: falkordb/falkordb-tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
platforms: ${{ matrix.platform }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
build-args: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
BASE_IMAGE=localhost:5000/falkordb/falkordb-compiler | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
TARGETPLATFORM=${{ matrix.platform }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Upload tests image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/upload-artifact@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
name: falkordb-tests-${{ env.ARCH_SUFFIX }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
path: /tmp/falkordb-tests-${{ env.ARCH_SUFFIX }}.tar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if-no-files-found: error | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Build base image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
id: build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/build-push-action@v5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
context: /FalkorDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
file: /FalkorDB/build/docker/Dockerfile | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
platforms: ${{ matrix.platform }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputs: type=docker,dest=/tmp/falkordb-${{ env.ARCH_SUFFIX }}.tar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
tags: falkordb/falkordb-${{ env.ARCH_SUFFIX }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
build-args: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
BASE_IMAGE=localhost:5000/falkordb/falkordb-compiler | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
TARGETPLATFORM=${{ matrix.platform }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Upload image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/upload-artifact@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
name: falkordb-${{ env.ARCH_SUFFIX }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
path: /tmp/falkordb-${{ env.ARCH_SUFFIX }}.tar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if-no-files-found: error | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
unit-tests: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
needs: build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
container: falkordb/falkordb:${{ github.ref_name }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
needs: merge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
strategy: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
fail-fast: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
matrix: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
platform: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- linux/amd64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- linux/arm64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
ARCH_SUFFIX: ${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Download image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/download-artifact@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
name: falkordb-tests-${{ env.ARCH_SUFFIX }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
path: /tmp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Set up QEMU | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if: ${{ matrix.platform == 'linux/arm64' }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/setup-qemu-action@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Load image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
id: load_image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker load --input /tmp/falkordb-tests-${{ env.ARCH_SUFFIX }}.tar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Unit tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
working-directory: /FalkorDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: make unit-tests CLEAR_LOGS=0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker run --platform ${{ matrix.platform }} --rm falkordb/falkordb-tests make CLEAR_LOGS=0 unit-tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
flow-tests: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
needs: build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
container: falkordb/falkordb:${{ github.ref_name }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
needs: merge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
strategy: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
fail-fast: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
matrix: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
platform: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- linux/amd64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- linux/arm64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
ARCH_SUFFIX: ${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Download image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/download-artifact@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
name: falkordb-tests-${{ env.ARCH_SUFFIX }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
path: /tmp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Set up QEMU | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if: ${{ matrix.platform == 'linux/arm64' }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/setup-qemu-action@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Load image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
id: load_image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker load --input /tmp/falkordb-tests-${{ env.ARCH_SUFFIX }}.tar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Flow tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
working-directory: /FalkorDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: make CLEAR_LOGS=0 PARALLEL=4 flow-tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker run --platform ${{ matrix.platform }} --rm falkordb/falkordb-tests make CLEAR_LOGS=0 PARALLEL=4 flow-tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
tck-tests: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
needs: build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
container: falkordb/falkordb:${{ github.ref_name }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
needs: merge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
strategy: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
fail-fast: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
matrix: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
platform: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- linux/amd64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- linux/arm64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
ARCH_SUFFIX: ${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Download image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/download-artifact@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
name: falkordb-tests-${{ env.ARCH_SUFFIX }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
path: /tmp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Set up QEMU | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if: ${{ matrix.platform == 'linux/arm64' }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/setup-qemu-action@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Load image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
id: load_image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker load --input /tmp/falkordb-tests-${{ env.ARCH_SUFFIX }}.tar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: TCK tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
working-directory: /FalkorDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: make CLEAR_LOGS=0 tck-tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker run --platform ${{ matrix.platform }} --rm falkordb/falkordb-tests make CLEAR_LOGS=0 tck-tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
fuzz-tests: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
needs: build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
container: falkordb/falkordb:${{ github.ref_name }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
needs: merge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
strategy: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
fail-fast: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
matrix: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
platform: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- linux/amd64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- linux/arm64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
ARCH_SUFFIX: ${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Download image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: actions/download-artifact@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
name: falkordb-tests-${{ env.ARCH_SUFFIX }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
path: /tmp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Set up QEMU | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if: ${{ matrix.platform == 'linux/arm64' }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
uses: docker/setup-qemu-action@v3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Load image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
id: load_image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker load --input /tmp/falkordb-tests-${{ env.ARCH_SUFFIX }}.tar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
- name: Fuzz tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
working-directory: /FalkorDB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: make fuzz TIMEOUT=180 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
docker run --platform ${{ matrix.platform }} --rm falkordb/falkordb-tests make fuzz TIMEOUT=180 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a filter for
types
underpull_request
to limit the workflow trigger to specific activities, enhancing control and efficiency.