From 98248d2174ed81b2b6a299a7de6f943896db8bf1 Mon Sep 17 00:00:00 2001 From: marc-adaptive Date: Thu, 19 Dec 2024 13:49:47 -0500 Subject: [PATCH] [Build] Remove OSS c/c++ binary step in release workflow --- .github/workflows/release.yml | 91 ++++++++--------------------------- cppbuild/awslinux/Dockerfile | 41 ---------------- cppbuild/debian/Dockerfile | 46 ------------------ cppbuild/rocky/Dockerfile | 14 +----- cppbuild/ubuntu/Dockerfile | 47 ------------------ 5 files changed, 20 insertions(+), 219 deletions(-) delete mode 100644 cppbuild/awslinux/Dockerfile delete mode 100644 cppbuild/debian/Dockerfile delete mode 100644 cppbuild/ubuntu/Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f38c5bed85..7fb402dec6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,91 +37,38 @@ jobs: contents: read packages: write needs: [ ci, ci-low-cadence, codeql ] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout code uses: actions/checkout@v4 with: ref: ${{ github.ref }} + - name: Cache Gradle dependencies + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Cache Gradle wrappers + uses: actions/cache@v4 + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} - name: Setup java uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: 17 + - name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION + run: | + java -Xinternalversion + echo "BUILD_JAVA_HOME=${JAVA_HOME}" >> $GITHUB_ENV + echo "BUILD_JAVA_VERSION=17" >> $GITHUB_ENV - name: Publish with Gradle run: ./gradlew publish env: ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.SONATYPE_CENTRAL_USERNAME }} ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }} ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_RSA_SIGN_KEY }} - ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_RSA_SIGN_KEYPASS }} - - release-c: - name: Release c artifacts - permissions: - contents: write - id-token: write - packages: write - needs: [ ci, ci-low-cadence, codeql ] - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - distro: ubuntu - version: 20.04 - gcc-version: default - - distro: ubuntu - version: 22.04 - gcc-version: default - - distro: debian - version: bullseye - gcc-version: default - - distro: debian - version: bookworm - gcc-version: default - - distro: rocky - version: 8.9 - gcc-version: 10 - - distro: rocky - version: 9.3 - gcc-version: 13 - - distro: awslinux - version: 2023 - gcc-version: default - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build Artifacts Using Docker - uses: docker/build-push-action@v6 - with: - context: . - file: ./cppbuild/${{ matrix.distro }}/Dockerfile - pull: true - shm-size: 1g - outputs: type=local,dest=build - target: essentials-artifacts - build-args: | - VERSION=${{ matrix.version }} - GCC_VERSION=${{ matrix.gcc-version }} - - name: Rename artifact - run: | - artifact_name=aeron-$(cat version.txt)-${{ matrix.distro }}-${{ matrix.version }}-x86_64.tar.gz - echo "artifact_name=$artifact_name" >> $GITHUB_ENV - mv ./build/*.tar.gz ./build/$artifact_name - - name: Setup JFrog CLI - uses: jfrog/setup-jfrog-cli@v4 - env: - JF_URL: ${{ vars.JFROG_OIDC_URL }} - with: - oidc-provider-name: ${{ vars.JFROG_OIDC_PROVIDER }} - oidc-audience: ${{ vars.JFROG_OIDC_AUDIENCE }} - - name: Publish Build info With JFrog CLI - run: jf rt u *.tar.gz ${{ vars.JFROG_AERON_OSS_REPO_NAME }} - working-directory: ./build + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_RSA_SIGN_KEYPASS }} \ No newline at end of file diff --git a/cppbuild/awslinux/Dockerfile b/cppbuild/awslinux/Dockerfile deleted file mode 100644 index ba6bf11eb4..0000000000 --- a/cppbuild/awslinux/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -ARG VERSION="2023" -FROM amazonlinux:${VERSION} as builder - -RUN yum update && yum install -y https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm && \ - yum update && yum install -y \ - gcc \ - g++ \ - make \ - tar \ - zlib-devel \ - libbsd-devel \ - libuuid-devel \ - git \ - zulu17-jdk \ - doxygen \ - python3 - -ENV JAVA_HOME=/usr/lib/jvm/java-17-zulu-openjdk \ - BUILD_JAVA_HOME=/usr/lib/jvm/java-17-zulu-openjdk \ - BUILD_JAVA_VERSION=17 \ - GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail" - -ARG USER_ID="1000" -ARG GROUP_ID="1000" -RUN groupadd --gid $GROUP_ID --non-unique --system athena -RUN adduser --uid $USER_ID --system --create-home --gid $GROUP_ID athena - -USER athena -WORKDIR /opt/aeron -ADD --chown=athena:athena . /opt/aeron - -RUN git config --global user.email "build@aeron.io" -RUN git config --global user.name "Athena (Build Master)" -RUN git config --global core.autocrlf false -RUN git update-index -q --refresh - -FROM builder as essentials-build -RUN cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --package - -FROM scratch AS essentials-artifacts -COPY --from=essentials-build /opt/aeron/cppbuild/Release/*.tar.gz / \ No newline at end of file diff --git a/cppbuild/debian/Dockerfile b/cppbuild/debian/Dockerfile deleted file mode 100644 index db75017216..0000000000 --- a/cppbuild/debian/Dockerfile +++ /dev/null @@ -1,46 +0,0 @@ -ARG VERSION="bookworm" -FROM debian:${VERSION} as builder - -RUN apt-get update && apt-get install -y \ - gcc \ - g++ \ - make \ - tar \ - zlib1g-dev \ - libbsd-dev \ - uuid-dev \ - curl \ - gnupg \ - ca-certificates \ - git \ - doxygen \ - python3 - -RUN curl -s https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg && \ - echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | tee /etc/apt/sources.list.d/zulu.list && \ - apt-get update && apt-get install -y zulu17-jdk - -ENV JAVA_HOME=/usr/lib/jvm/zulu17 \ - BUILD_JAVA_HOME=/usr/lib/jvm/zulu17 \ - BUILD_JAVA_VERSION=17 \ - GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail" - -ARG USER_ID="1000" -ARG GROUP_ID="1000" -RUN groupadd --gid $GROUP_ID --non-unique --system athena -RUN adduser --uid $USER_ID --system --home /home/athena --gid $GROUP_ID athena - -USER athena -WORKDIR /opt/aeron -ADD --chown=athena:athena . /opt/aeron - -RUN git config --global user.email "build@aeron.io" -RUN git config --global user.name "Athena (Build Master)" -RUN git config --global core.autocrlf false -RUN git update-index -q --refresh - -FROM builder as essentials-build -RUN cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --package - -FROM scratch AS essentials-artifacts -COPY --from=essentials-build /opt/aeron/cppbuild/Release/*.tar.gz / diff --git a/cppbuild/rocky/Dockerfile b/cppbuild/rocky/Dockerfile index 0ae2c724bd..02d1b5639c 100755 --- a/cppbuild/rocky/Dockerfile +++ b/cppbuild/rocky/Dockerfile @@ -32,16 +32,4 @@ USER athena WORKDIR /opt/aeron FROM builder as essentials-test -ENTRYPOINT scl enable "gcc-toolset-${GCC_VERSION}" -- cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --package - -FROM builder as essentials-build - -ADD --chown=athena:athena . /opt/aeron -RUN git config --global user.email "build@aeron.io" -RUN git config --global user.name "Athena (Build Master)" -RUN git config --global core.autocrlf false -RUN git update-index -q --refresh -RUN scl enable "gcc-toolset-${GCC_VERSION}" -- cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --package - -FROM scratch AS essentials-artifacts -COPY --from=essentials-build /opt/aeron/cppbuild/Release/*.tar.gz / \ No newline at end of file +ENTRYPOINT scl enable "gcc-toolset-${GCC_VERSION}" -- cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --package \ No newline at end of file diff --git a/cppbuild/ubuntu/Dockerfile b/cppbuild/ubuntu/Dockerfile deleted file mode 100644 index 93e57bd2b7..0000000000 --- a/cppbuild/ubuntu/Dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -ARG VERSION="22.04" -FROM ubuntu:${VERSION} as builder - -RUN apt-get update && apt-get install -y \ - gcc \ - g++ \ - make \ - tar \ - zlib1g-dev \ - libbsd-dev \ - uuid-dev \ - curl \ - gnupg \ - ca-certificates \ - git \ - doxygen \ - python3 - -RUN curl -s https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg && \ - echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | tee /etc/apt/sources.list.d/zulu.list && \ - apt-get update && apt-get install -y zulu17-jdk - -ENV JAVA_HOME=/usr/lib/jvm/zulu17 \ - BUILD_JAVA_HOME=/usr/lib/jvm/zulu17 \ - BUILD_JAVA_VERSION=17 \ - GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail" - -ARG USER_ID="1000" -ARG GROUP_ID="1000" -RUN groupadd --gid $GROUP_ID --non-unique --system athena -RUN adduser --uid $USER_ID --system --gid $GROUP_ID athena - -USER athena -WORKDIR /opt/aeron -ADD --chown=athena:athena . /opt/aeron - -RUN git config --global user.email "build@aeron.io" -RUN git config --global user.name "Athena (Build Master)" -RUN git config --global core.autocrlf false -RUN git update-index -q --refresh - -FROM builder as essentials-build -RUN cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --package - -FROM scratch AS essentials-artifacts -COPY --from=essentials-build /opt/aeron/cppbuild/Release/*.tar.gz / -