Skip to content

ci: add new build pipeline with concurrent builds #1

ci: add new build pipeline with concurrent builds

ci: add new build pipeline with concurrent builds #1

Workflow file for this run

name: Build
on:
push:
branches: [ "7.0-ci" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board: [bpi-r2, bpi-r64, bpi-r2pro, bpi-r3, bpi-r4]
steps:
- name: Checkout (shallow)
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Cache ccache
uses: actions/cache@v4
with:
path: ~/.cache/ccache/${{ matrix.board }}
key: ccache-${{ github.ref_name }}-${{ matrix.board }}-${{ github.run_id }}
restore-keys: |
ccache-${{ github.ref_name }}-${{ matrix.board }}-
- name: update apt-repos (u24)
if: env.UBUNTU_MAJOR_VERSION == '24'
run: |
sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ports.sources
sudo sed -i.bak -e 's/^\(Suites:.*\)$/\1\nArchitectures: amd64 i386/' /etc/apt/sources.list.d/ubuntu.sources
sudo sed -i.bak -e 's/^URIs:.*$/URIs: http:\/\/ports.ubuntu.com\/ubuntu-ports\//' /etc/apt/sources.list.d/ports.sources
sudo sed -i -e 's/^\(Suites:.*\)$/\1\nArchitectures: armhf arm64/' /etc/apt/sources.list.d/ports.sources
cat /etc/apt/sources.list.d/ports.sources
- name: Install depencies
run: |
sudo dpkg --add-architecture armhf
sudo dpkg --add-architecture arm64
sudo apt update
sudo apt install ccache libssl-dev:armhf libssl-dev:arm64 build-essential u-boot-tools python3-mako debhelper fakeroot gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu make device-tree-compiler libncurses5-dev libelf-dev libdw-dev
- name: Configure board to ${{ matrix.board }}
run: |
sed -ri 's/^#(board=${{ matrix.board }})$/\1/' build.conf #change board to ${{ matrix.board }}
- name: Run build for ${{ matrix.board }}
run: |
bash build.sh importconfig
bash build.sh build
bash build.sh cryptodev
bash build.sh pack
- name: Collect artifacts
run: |
mkdir -p out/${{ matrix.board }}
# SD Images
if compgen -G "../SD/*" > /dev/null; then
cp -r ../SD/* out/${{ matrix.board }}/
fi
# DEB Pakete
if compgen -G "../*.deb" > /dev/null; then
cp ../*.deb out/${{ matrix.board }}/
fi
# ITB Files
if compgen -G "*.itb" > /dev/null; then
cp *.itb out/${{ matrix.board }}/
fi
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.board }}
path: out/${{ matrix.board }}
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout (full history)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Generate changelog
run: |
git log --pretty=format:"* %s" > CHANGELOG.md
#- name: Create release
# uses: softprops/action-gh-release@v2
# with:
# files: artifacts/**/*
# body_path: CHANGELOG.md