Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build gluon 2022.1.x #5

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7020eb4
Scaffold image build workflow
mraerino Aug 11, 2024
c342280
Fix missing checkout
mraerino Aug 11, 2024
139ca40
Turn target list into json
mraerino Aug 11, 2024
02557b8
Fix type of output
mraerino Aug 11, 2024
bca85bf
Reduce targets for previews
mraerino Aug 11, 2024
6d8751c
Actually build gluon
mraerino Aug 11, 2024
70f1ee8
Install python2
mraerino Aug 11, 2024
87415e9
Fix target name
mraerino Aug 11, 2024
51f2a66
Tune job cancellation
mraerino Aug 11, 2024
1d854ae
Cache toolchain
mraerino Aug 11, 2024
9826fb4
Always save cache
mraerino Aug 12, 2024
15dbf0d
Allow debugging build failures
mraerino Aug 12, 2024
416e49a
Help with debugging cache
mraerino Aug 12, 2024
2d51de0
Fix cache logging
mraerino Aug 12, 2024
e5bbe2f
Restore cache before gluon init
mraerino Aug 12, 2024
ef2dbca
Revert "Update config to new gluon version"
mraerino Aug 12, 2024
4efe30b
Ensure cache is always saved
mraerino Aug 12, 2024
284fa77
Fix invalid use of anchors
mraerino Aug 12, 2024
e61c0ca
Reapply "Update config to new gluon version"
mraerino Aug 12, 2024
14e8620
Build newer gluon
mraerino Aug 12, 2024
b1fd8bc
Upload artifacts
mraerino Aug 12, 2024
6bd6586
Install tools to build x86 images
mraerino Aug 24, 2024
cc2747c
Free up disk space in build VM
mraerino Aug 24, 2024
5b16ac3
Configure domain for new supernode
mraerino Aug 24, 2024
010358d
Fix config syntax
mraerino Aug 24, 2024
390605f
Fix domain name
mraerino Aug 24, 2024
989898b
Revert "Configure domain for new supernode"
mraerino Aug 26, 2024
4a74e4e
Fix caching
mraerino Aug 26, 2024
c264fd3
Fix cache handling
mraerino Aug 26, 2024
45d554a
Dummy to test caching
mraerino Aug 27, 2024
a095f21
Adjust cache directories
mraerino Aug 27, 2024
824426a
Test caching
mraerino Sep 2, 2024
2380d0b
Switch to ccache for caching
mraerino Sep 8, 2024
0f51951
Set C compiler to use ccache properly
mraerino Oct 11, 2024
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
86 changes: 86 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Gluon

on:
push:

env:
GLUON_RELEASE: v2022.1.4
PREVIEW_TARGETS: '["x86-64", "ath79-generic"]'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
gather_targets:
name: Gather targets
runs-on: ubuntu-24.04
outputs:
targets: ${{ github.ref_type == 'tag' && steps.list.outputs.targets || env.PREVIEW_TARGETS }}
steps:
- uses: actions/checkout@v4
with:
repository: freifunk-gluon/gluon
ref: ${{ env.GLUON_RELEASE }}
- uses: actions/checkout@v4
with:
path: site
- if: github.ref_type == 'tag'
run: |
TARGETS=$(make list-targets)
# save to output as json
echo "targets=[\"${TARGETS//$'\n'/\",\"}\"]" >> $GITHUB_OUTPUT
id: list

build:
needs: gather_targets
name: Build Images
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.gather_targets.outputs.targets) }}
env:
CACHE_BUSTER: "1"
CC: gcc
steps:
- name: Free up disk space
run: rm -rf /opt/hostedtoolcache

- uses: actions/checkout@v4
with:
repository: freifunk-gluon/gluon
ref: ${{ env.GLUON_RELEASE }}
- uses: actions/checkout@v4
with:
path: site

- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
create-symlink: true
key: ${{ env.GLUON_RELEASE }}-${{ matrix.target }}-ccache

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y --no-install-recommends install \
python2 qemu-utils

- name: Prepare Gluon
run: make update

- name: Build Gluon Image
id: build
run: make GLUON_TARGET="${{ matrix.target }}"

- name: Debug build failure
if: failure() && steps.build.conclusion == 'failure'
run: make -j1 V=sc GLUON_TARGET="${{ matrix.target }}"

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: images-${{ matrix.target }}
path: output/images/
compression-level: 1