Skip to content

Commit

Permalink
[Build] Remove OSS c/c++ binary step in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-adaptive committed Dec 19, 2024
1 parent cd4f1fd commit 98248d2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 219 deletions.
91 changes: 19 additions & 72 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
41 changes: 0 additions & 41 deletions cppbuild/awslinux/Dockerfile

This file was deleted.

46 changes: 0 additions & 46 deletions cppbuild/debian/Dockerfile

This file was deleted.

14 changes: 1 addition & 13 deletions cppbuild/rocky/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"
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 /
ENTRYPOINT scl enable "gcc-toolset-${GCC_VERSION}" -- cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --package
47 changes: 0 additions & 47 deletions cppbuild/ubuntu/Dockerfile

This file was deleted.

0 comments on commit 98248d2

Please sign in to comment.