diff --git a/.github/workflows/release_build_test.yaml b/.github/workflows/release_build_test.yaml new file mode 100644 index 000000000..966f42e48 --- /dev/null +++ b/.github/workflows/release_build_test.yaml @@ -0,0 +1,162 @@ +name: Release build test +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }} + cancel-in-progress: true + +on: + workflow_dispatch: + inputs: + build_type: + type: choice + description: "Memgraph Build type. Default value is Release." + default: 'Release' + options: + - Release + - RelWithDebInfo + + push: + branches: + - "release/**" + tags: + - "v*.*.*-rc*" + - "v*.*-rc*" + schedule: + # UTC + - cron: "0 22 * * *" + +env: + THREADS: 24 + MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }} + MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }} + BUILD_TYPE: ${{ github.event.inputs.build_type || 'Release' }} + +jobs: + Debian10: + uses: ./.github/workflows/release_debian10.yaml + with: + build_type: ${{ github.event.inputs.build_type || 'Release' }} + secrets: inherit + + Ubuntu20_04: + uses: ./.github/workflows/release_ubuntu2004.yaml + with: + build_type: ${{ github.event.inputs.build_type || 'Release' }} + secrets: inherit + + PackageDebian10: + if: github.ref_type == 'tag' + needs: [Debian10] + runs-on: [self-hosted, DockerMgBuild, X64] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package debian-10 $BUILD_TYPE + - name: "Upload package" + uses: actions/upload-artifact@v4 + with: + name: debian-10 + path: build/output/debian-10/memgraph*.deb + + PackageUbuntu20_04: + if: github.ref_type == 'tag' + needs: [Ubuntu20_04] + runs-on: [self-hosted, DockerMgBuild, X64] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package ubuntu-22.04 $BUILD_TYPE + - name: "Upload package" + uses: actions/upload-artifact@v4 + with: + name: ubuntu-22.04 + path: build/output/ubuntu-22.04/memgraph*.deb + + PackageUbuntu20_04_ARM: + if: github.ref_type == 'tag' + needs: [Ubuntu20_04] + runs-on: [self-hosted, DockerMgBuild, ARM64] + # M1 Mac mini is sometimes slower + timeout-minutes: 90 + steps: + - name: "Set up repository" + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package ubuntu-22.04-arm $BUILD_TYPE + - name: "Upload package" + uses: actions/upload-artifact@v4 + with: + name: ubuntu-22.04-aarch64 + path: build/output/ubuntu-22.04-arm/memgraph*.deb + + PackageDebian11: + if: github.ref_type == 'tag' + needs: [Debian10, Ubuntu20_04] + runs-on: [self-hosted, DockerMgBuild, X64] + timeout-minutes: 60 + steps: + - name: "Set up repository" + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package debian-11 $BUILD_TYPE + - name: "Upload package" + uses: actions/upload-artifact@v4 + with: + name: debian-11 + path: build/output/debian-11/memgraph*.deb + + PackageDebian11_ARM: + if: github.ref_type == 'tag' + needs: [Debian10, Ubuntu20_04] + runs-on: [self-hosted, DockerMgBuild, ARM64] + # M1 Mac mini is sometimes slower + timeout-minutes: 90 + steps: + - name: "Set up repository" + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required because of release/get_version.py + - name: "Build package" + run: | + ./release/package/run.sh package debian-11-arm $BUILD_TYPE + - name: "Upload package" + uses: actions/upload-artifact@v4 + with: + name: debian-11-aarch64 + path: build/output/debian-11-arm/memgraph*.deb + + PushToS3: + if: github.ref_type == 'tag' + needs: [PackageDebian10, PackageDebian11, PackageDebian11_ARM, PackageUbuntu20_04, PackageUbuntu20_04_ARM] + runs-on: ubuntu-latest + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + # name: # if name input parameter is not provided, all artifacts are downloaded + # and put in directories named after each one. + path: build/output/release + - name: Upload to S3 + uses: jakejarvis/s3-sync-action@v0.5.1 + env: + AWS_S3_BUCKET: "deps.memgraph.io" + AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_ACCESS_KEY }} + AWS_REGION: "eu-west-1" + SOURCE_DIR: "build/output/release" + DEST_DIR: "memgraph-unofficial/${{ github.ref_name }}/" diff --git a/.github/workflows/release_debian10.yaml b/.github/workflows/release_debian10.yaml index 37c144ee6..188617a6e 100644 --- a/.github/workflows/release_debian10.yaml +++ b/.github/workflows/release_debian10.yaml @@ -1,9 +1,12 @@ name: Release Debian 10 -concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }} - cancel-in-progress: true on: + workflow_call: + inputs: + build_type: + type: string + description: "Memgraph Build type. Default value is Release." + default: 'Release' workflow_dispatch: inputs: build_type: @@ -13,16 +16,9 @@ on: options: - Release - RelWithDebInfo - push: - branches: - - "release/**" - tags: - - "v*.*.*-rc*" - - "v*.*-rc*" - schedule: - - cron: "0 22 * * *" env: + OS: "Debian10" THREADS: 24 MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }} MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }} @@ -119,7 +115,7 @@ jobs: - name: Save code coverage uses: actions/upload-artifact@v4 with: - name: "Code coverage(Coverage build)" + name: "Code coverage(Coverage build)-${{ env.OS }}" path: tools/github/generated/code_coverage.tar.gz debug_build: @@ -173,7 +169,7 @@ jobs: - name: Save cppcheck and clang-format errors uses: actions/upload-artifact@v4 with: - name: "Code coverage(Debug build)" + name: "Code coverage(Debug build)-${{ env.OS }}" path: tools/github/cppcheck_and_clang_format.txt debug_integration_test: @@ -250,7 +246,7 @@ jobs: - name: Save enterprise DEB package uses: actions/upload-artifact@v4 with: - name: "Enterprise DEB package" + name: "Enterprise DEB package-${{ env.OS}}" path: build/output/memgraph*.deb - name: Run GQL Behave tests @@ -263,7 +259,7 @@ jobs: - name: Save quality assurance status uses: actions/upload-artifact@v4 with: - name: "GQL Behave Status" + name: "GQL Behave Status-${{ env.OS }}" path: | tests/gql_behave/gql_behave_status.csv tests/gql_behave/gql_behave_status.html @@ -463,5 +459,5 @@ jobs: uses: actions/upload-artifact@v4 if: ${{ always() }} with: - name: "Jepsen Report" + name: "Jepsen Report-${{ env.OS }}" path: tests/jepsen/Jepsen.tar.gz diff --git a/.github/workflows/release_ubuntu2004.yaml b/.github/workflows/release_ubuntu2004.yaml index a5ab17f79..be6099128 100644 --- a/.github/workflows/release_ubuntu2004.yaml +++ b/.github/workflows/release_ubuntu2004.yaml @@ -1,9 +1,12 @@ name: Release Ubuntu 20.04 -concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }} - cancel-in-progress: true on: + workflow_call: + inputs: + build_type: + type: string + description: "Memgraph Build type. Default value is Release." + default: 'Release' workflow_dispatch: inputs: build_type: @@ -13,16 +16,9 @@ on: options: - Release - RelWithDebInfo - push: - branches: - - "release/**" - tags: - - "v*.*.*-rc*" - - "v*.*-rc*" - schedule: - - cron: "0 22 * * *" env: + OS: "Ubuntu 20.04" THREADS: 24 MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }} MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }} @@ -115,7 +111,7 @@ jobs: - name: Save code coverage uses: actions/upload-artifact@v4 with: - name: "Code coverage(Coverage build)" + name: "Code coverage(Coverage build)-${{ env.OS }}" path: tools/github/generated/code_coverage.tar.gz debug_build: @@ -169,7 +165,7 @@ jobs: - name: Save cppcheck and clang-format errors uses: actions/upload-artifact@v4 with: - name: "Code coverage(Debug build)" + name: "Code coverage(Debug build)-${{ env.OS }}" path: tools/github/cppcheck_and_clang_format.txt debug_integration_test: @@ -246,7 +242,7 @@ jobs: - name: Save enterprise DEB package uses: actions/upload-artifact@v4 with: - name: "Enterprise DEB package" + name: "Enterprise DEB package-${{ env.OS }}" path: build/output/memgraph*.deb - name: Run GQL Behave tests @@ -259,7 +255,7 @@ jobs: - name: Save quality assurance status uses: actions/upload-artifact@v4 with: - name: "GQL Behave Status" + name: "GQL Behave Status-${{ env.OS }}" path: | tests/gql_behave/gql_behave_status.csv tests/gql_behave/gql_behave_status.html