ci: diable ci-branches in old build.yml #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, idempotent) | |
| if: env.UBUNTU_MAJOR_VERSION == '24' | |
| run: | | |
| set -e | |
| UBUNTU_SRC=/etc/apt/sources.list.d/ubuntu.sources | |
| PORTS_SRC=/etc/apt/sources.list.d/ports.sources | |
| # --- 1. ubuntu.sources → nur Host-Arch --- | |
| if grep -q '^Architectures:' "$UBUNTU_SRC"; then | |
| sudo sed -i 's/^Architectures:.*/Architectures: amd64 i386/' "$UBUNTU_SRC" | |
| else | |
| sudo sed -i '/^Suites:/a Architectures: amd64 i386' "$UBUNTU_SRC" | |
| fi | |
| # --- 2. ports.sources neu erzeugen (immer sauber) --- | |
| sudo cp "$UBUNTU_SRC" "$PORTS_SRC" | |
| # URI auf ports umbiegen | |
| sudo sed -i 's|^URIs:.*|URIs: http://ports.ubuntu.com/ubuntu-ports/|' "$PORTS_SRC" | |
| # Arch setzen (überschreiben oder hinzufügen) | |
| if grep -q '^Architectures:' "$PORTS_SRC"; then | |
| sudo sed -i 's/^Architectures:.*/Architectures: armhf arm64/' "$PORTS_SRC" | |
| else | |
| sudo sed -i '/^Suites:/a Architectures: armhf arm64' "$PORTS_SRC" | |
| fi | |
| # --- 3. Sicherheit: keine falschen security URIs für ARM --- | |
| # (falls ubuntu.sources mehrere Blöcke hat) | |
| sudo sed -i 's|http://security.ubuntu.com/ubuntu|http://archive.ubuntu.com/ubuntu|g' "$UBUNTU_SRC" | |
| # --- 4. Debug-Ausgabe --- | |
| echo "==== ubuntu.sources ====" | |
| cat "$UBUNTU_SRC" | |
| echo "==== ports.sources ====" | |
| cat "$PORTS_SRC" | |
| - 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 |