diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index b15d40b..f4f5e28 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,4 +1,4 @@ -name: Solaris Build +name: Solaris Multi-Build on: push: @@ -9,41 +9,57 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + include: + - host: 172.16.11.20 # Solaris 2.6 i386 + osver: "2.6" + arch: "i386" + # - host: 172.16.11.21 # Solaris 2.6 sparc + # osver: "2.6" + # arch: "sparc" + # - host: 172.16.11.22 # Solaris 7 i386 + # osver: "7" + # arch: "i386" + # - host: 172.16.11.23 # Solaris 7 sparc + # osver: "7" + # arch: "sparc" + # Add more hosts for each Solaris version / architecture steps: - name: Checkout repository uses: actions/checkout@v3 - - name: SSH to build host and run builds + - name: Build binutils on Solaris ${{ matrix.osver }} ${{ matrix.arch }} uses: appleboy/ssh-action@master with: - host: 172.16.11.20 + host: ${{ matrix.host }} username: root key: ${{ secrets.BUILD_SSH_KEY }} script: | set -e - echo "=== Updating sources ===" + echo "=== Updating sources on Solaris ${{ matrix.osver }} ===" cd /usr/src/buildpkg && git pull cd /usr/src/dbpware-for-solaris && git pull export BUILDPKG_SCRIPTS=/usr/src/buildpkg/ export BUILDPKG_BASE=/usr/src/dbpware-for-solaris/ - # Define build order (adjust as needed) + # Define build order (other packages commented out) BUILD_ORDER=( binutils # gcc # gmake # coreutils - # add more packages in dependency order + # add more packages in build order ) for pkg in "${BUILD_ORDER[@]}"; do echo "=== Checking $pkg ===" cd "$BUILDPKG_BASE/$pkg" - # Parse basic fields from build.sh using GNU grep (ggrep) + # Parse basic fields from build.sh using GNU grep topdir=$(ggrep -E '^topdir=' build.sh | cut -d= -f2) version=$(ggrep -E '^version=' build.sh | cut -d= -f2) pkgver=$(ggrep -E '^pkgver=' build.sh | cut -d= -f2) @@ -56,7 +72,7 @@ jobs: continue fi - echo "=== Building $pkg (version $version pkgver $pkgver) ===" + echo "=== Building $pkg on Solaris ${{ matrix.osver }} ${{ matrix.arch }} ===" LOGFILE=$(bash build.sh all 2>&1 | tee /tmp/build-$pkg.log | ggrep -oE '[^ ]+\.log' | tail -n1) if [ -z "$LOGFILE" ]; then @@ -68,7 +84,6 @@ jobs: tail -f "$LOGFILE" & TAIL_PID=$! - # Wait for the build to complete wait -n EXIT_CODE=$? kill $TAIL_PID || true