Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release Pipeline

on:
push:
tags:
- 'v*' # Triggers on version tags like v1.0.0

jobs:
build-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build x86_64 toolchain
run: ./docker_build_and_run.sh x86_64

- name: Upload x86_64 artifacts
uses: actions/upload-artifact@v4
with:
name: x86_64-artifacts
path: output/x86_64-unknown-linux-gnu_gcc12.tar.gz*
if-no-files-found: error

build-aarch64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build aarch64 toolchain
run: ./docker_build_and_run.sh aarch64

- name: Upload aarch64 artifacts
uses: actions/upload-artifact@v4
with:
name: aarch64-artifacts
path: output/aarch64-unknown-linux-gnu_gcc12.tar.gz*
if-no-files-found: error

release:
needs: [build-x86_64, build-aarch64]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/

- name: Prepare release artifacts
run: |
# Create dist directory for final artifacts
mkdir -p dist

# Move all artifacts to dist
cp artifacts/x86_64-artifacts/* dist/
cp artifacts/aarch64-artifacts/* dist/

echo "Release artifacts:"
ls -la dist/

- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e

# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
Expand Down Expand Up @@ -64,3 +65,7 @@ tar -c \
--numeric-owner \
-C "output/${TARGET_TRIPLET}_gcc${GCC}" . \
| gzip -n > "output/${TARGET_TRIPLET}_gcc${GCC}.tar.gz"

cd output
sha256sum ${TARGET_TRIPLET}_gcc${GCC}.tar.gz > ${TARGET_TRIPLET}_gcc${GCC}.tar.gz.sha256
cd ..
3 changes: 2 additions & 1 deletion configs/aarch64-unknown-linux-gnu_gcc12
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ CT_GLIBC_KERNEL_VERSION_NONE=y
CT_GCC_V_12=y
CT_CC_GCC_LNK_HASH_STYLE_BOTH=y
CT_CC_LANG_CXX=y
CT_COMP_LIBS_EXPAT=y
CT_COMP_LIBS_EXPAT=y
CT_LOG_PROGRESS_BAR=n
1 change: 1 addition & 0 deletions configs/x86_64-unknown-linux-gnu_gcc12
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ CT_GCC_V_12=y
CT_CC_GCC_LNK_HASH_STYLE_BOTH=y
CT_CC_LANG_CXX=y
CT_COMP_LIBS_EXPAT=y
CT_LOG_PROGRESS_BAR=n
19 changes: 17 additions & 2 deletions docker_build_and_run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e

# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
Expand Down Expand Up @@ -39,5 +40,19 @@ GCC_VERSION=${2:-12}

echo "Building toolchain for architecture: $ARCH with GCC version: $GCC_VERSION"

# Execute the build of the selected toolchain
docker run --rm -it --user "$(id -u):$(id -g)" -v ${PWD}:/workspace $FULL_IMAGE_NAME /bin/bash -c "cd /workspace && GCC=$GCC_VERSION ARCH=$ARCH ./build.sh"
# Check if we're in a CI environment
if [ -n "$CI" ] || [ ! -t 0 ]; then
# CI environment - no interactive/tty
docker run --rm --user "$(id -u):$(id -g)" -v ${PWD}:/workspace $FULL_IMAGE_NAME /bin/bash -c "
set -e
cd /workspace
GCC=$GCC_VERSION ARCH=$ARCH ./build.sh
"
else
# Local development - interactive mode
docker run --rm -it --user "$(id -u):$(id -g)" -v ${PWD}:/workspace $FULL_IMAGE_NAME /bin/bash -c "
set -e
cd /workspace
GCC=$GCC_VERSION ARCH=$ARCH ./build.sh
"
fi