mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-28 11:43:01 +02:00
The Classic builds served for a while as an introduction to classic embedded systems, with a user managed read-writable /etc. Today we decided to firmly take the plunge into the future with NETCONF and focus on our core platforms aarch64 and x86_64 (for Qemu). The reasons are several: reduce overhead, simplify build and release work, as well as manual testing, since Classic builds do not have any automated regression testing. The Classic builds may be resurrected later in a dedicated project. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
104 lines
3.2 KiB
YAML
104 lines
3.2 KiB
YAML
name: Bob the Builder
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Infix ${{ matrix.platform }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
platform: [aarch64, x86_64]
|
|
fail-fast: false
|
|
steps:
|
|
- name: Maintenance
|
|
run: |
|
|
docker image prune -af
|
|
docker volume prune -f
|
|
docker container prune -f
|
|
- uses: actions/checkout@v4
|
|
- name: Set Build Variables
|
|
id: vars
|
|
run: |
|
|
target=${{ matrix.platform }}
|
|
echo "dir=infix-$target" >> $GITHUB_OUTPUT
|
|
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
|
|
if [ "$target" = x86_64 ]; then
|
|
echo "out=$PWD/output" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "out=/mnt/x-$target" >> $GITHUB_OUTPUT
|
|
fi
|
|
- name: Restore Cache of dl/
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: dl/
|
|
key: dl-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
|
|
restore-keys: |
|
|
dl-
|
|
- name: Restore Cache of .ccache/
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: .ccache/
|
|
key: ccache-${{ matrix.platform }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
|
|
restore-keys: |
|
|
ccache-${{ matrix.platform }}-
|
|
ccache-
|
|
- name: Configure & Build
|
|
run: |
|
|
target=${{ matrix.platform }}_defconfig
|
|
echo "Building $target ..."
|
|
sudo mkdir ${{ steps.vars.outputs.out }}
|
|
sudo chown $(id -un):$(id -gn) ${{ steps.vars.outputs.out }}
|
|
export O=${{ steps.vars.outputs.out }}
|
|
make $target
|
|
make
|
|
- name: Prepare Artifact
|
|
run: |
|
|
cd ${{ steps.vars.outputs.out }}
|
|
mv images ${{ steps.vars.outputs.dir }}
|
|
ln -s ${{ steps.vars.outputs.dir }} images
|
|
tar chfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
|
- name: Test
|
|
if: matrix.platform == 'x86_64'
|
|
run: |
|
|
export O=${{ steps.vars.outputs.out }}
|
|
make test-qeneth
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
path: ${{ steps.vars.outputs.out }}/${{ steps.vars.outputs.tgz }}
|
|
name: artifact-${{ matrix.platform }}
|
|
release:
|
|
if: ${{github.repository_owner == 'kernelkit' && github.ref_name == 'main'}}
|
|
name: Upload Latest Build
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
pattern: "artifact-*"
|
|
merge-multiple: true
|
|
- uses: ncipollo/release-action@v1
|
|
with:
|
|
allowUpdates: true
|
|
omitName: true
|
|
omitBody: true
|
|
omitBodyDuringUpdate: true
|
|
prerelease: true
|
|
tag: "latest"
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
artifacts: "*.tar.gz"
|
|
- name: Summary
|
|
run: |
|
|
cat <<EOF >> $GITHUB_STEP_SUMMARY
|
|
# Latest Build Complete! :rocket:
|
|
|
|
For the public download links of these build artifacts, please see:
|
|
<https://github.com/kernelkit/infix/releases/tag/latest>
|
|
EOF
|