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

Scaffold image build workflow #3

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
93 changes: 93 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Gluon

on:
push:

env:
GLUON_RELEASE: v2021.1.2
PREVIEW_TARGETS: '["x86-64", "ar71xx-generic", "ar71xx-tiny"]'

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) }}
steps:
- uses: actions/checkout@v4
with:
repository: freifunk-gluon/gluon
ref: ${{ env.GLUON_RELEASE }}
- uses: actions/checkout@v4
with:
path: site

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

- name: Restore toolchain cache
uses: actions/cache/restore@v4
with:
path: |
packages
openwrt/build_dir
openwrt/staging_dir
# keep this in sync with the key on the restore action!
key: ${{ env.GLUON_RELEASE }}-${{ matrix.target }}-build-deps

- name: Debug cache restore
run: |
ls -la packages/ || true
ls -la openwrt/build_dir/ || true
ls -la openwrt/staging_dir/ || true

- 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: Save toolchain cache
uses: actions/cache/save@v4
if: always()
with:
path: |
packages
openwrt/build_dir
openwrt/staging_dir
key: ${{ env.GLUON_RELEASE }}-${{ matrix.target }}-build-deps
1 change: 0 additions & 1 deletion domains/ffddorf_dom0.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom0.freifunk-duesseldorf.de:11000',
'vpn02-dom0.freifunk-duesseldorf.de:11000',
Expand Down
1 change: 0 additions & 1 deletion domains/ffddorf_dom1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom1.freifunk-duesseldorf.de:11001',
'vpn02-dom1.freifunk-duesseldorf.de:11001',
Expand Down
1 change: 0 additions & 1 deletion domains/ffddorf_dom10.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom10.freifunk-duesseldorf.de:11010',
'vpn02-dom10.freifunk-duesseldorf.de:11010',
Expand Down
1 change: 0 additions & 1 deletion domains/ffddorf_dom2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom2.freifunk-duesseldorf.de:11002',
'vpn02-dom2.freifunk-duesseldorf.de:11002',
Expand Down
1 change: 0 additions & 1 deletion domains/ffddorf_dom3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom3.freifunk-duesseldorf.de:11003',
'vpn02-dom3.freifunk-duesseldorf.de:11003',
Expand Down
1 change: 0 additions & 1 deletion domains/ffddorf_dom4.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom4.freifunk-duesseldorf.de:11004',
'vpn02-dom4.freifunk-duesseldorf.de:11004',
Expand Down
1 change: 0 additions & 1 deletion domains/ffddorf_dom5.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom5.freifunk-duesseldorf.de:11005',
'vpn02-dom5.freifunk-duesseldorf.de:11005',
Expand Down
1 change: 0 additions & 1 deletion domains/ffddorf_dom6.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom6.freifunk-duesseldorf.de:11006',
'vpn02-dom6.freifunk-duesseldorf.de:11006',
Expand Down
1 change: 0 additions & 1 deletion domains/ffddorf_dom7.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom7.freifunk-duesseldorf.de:11007',
'vpn02-dom7.freifunk-duesseldorf.de:11007',
Expand Down
1 change: 0 additions & 1 deletion domains/ffddorf_dom8.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom8.freifunk-duesseldorf.de:11008',
'vpn02-dom8.freifunk-duesseldorf.de:11008',
Expand Down
1 change: 0 additions & 1 deletion domains/ffddorf_dom9.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom9.freifunk-duesseldorf.de:11009',
'vpn02-dom9.freifunk-duesseldorf.de:11009',
Expand Down
1 change: 0 additions & 1 deletion domains/ffneuss_dom0.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom0.freifunk-neuss.de:12000',
'vpn02-dom0.freifunk-neuss.de:12000',
Expand Down
1 change: 0 additions & 1 deletion domains/ffneuss_dom1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom1.freifunk-neuss.de:12001',
'vpn02-dom1.freifunk-neuss.de:12001',
Expand Down
1 change: 0 additions & 1 deletion domains/ffneuss_dom2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom2.freifunk-neuss.de:12002',
'vpn02-dom2.freifunk-neuss.de:12002',
Expand Down
1 change: 0 additions & 1 deletion domains/ffneuss_dom3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom3.freifunk-neuss.de:12003',
'vpn02-dom3.freifunk-neuss.de:12003',
Expand Down
1 change: 0 additions & 1 deletion domains/ffneuss_dom4.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom4.freifunk-neuss.de:12004',
'vpn02-dom4.freifunk-neuss.de:12004',
Expand Down
1 change: 0 additions & 1 deletion domains/ffneuss_dom5.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01-dom5.freifunk-neuss.de:12005',
'vpn02-dom5.freifunk-neuss.de:12005',
Expand Down
1 change: 0 additions & 1 deletion domains/legacy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'vpn01.freifunk-duesseldorf.de:10050',
'vpn02.freifunk-duesseldorf.de:10050',
Expand Down
1 change: 0 additions & 1 deletion domains/legacy_neuss.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
},
mesh_vpn = {
tunneldigger = {
mtu = 1364,
brokers = {
'supernode1.freifunk-neuss.de:10030',
'supernode2.freifunk-neuss.de:10030',
Expand Down
3 changes: 2 additions & 1 deletion site.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
},
mesh_vpn = {
enabled = true,
mtu = 1364,
bandwidth_limit = {
enabled = false,
ingress = 3000,
Expand All @@ -56,7 +57,7 @@
'http://1.updates.freifunk-duesseldorf.de/stable/sysupgrade',
'http://2.updates.freifunk-duesseldorf.de/stable/sysupgrade',
},
good_signatures = 1,
good_signatures = 2,
pubkeys = {
'cb79f3377ad78c0782a38e0fb6fc2a34270ca4c89c9e971b201a89bf8ddcd96f', -- CyrusFox (Freifunk Düsseldorf)
'c1eb8c55dd21bc4882a67b2b1f3cb50c572288acc35e52b393212ebf2b40180b', -- nomaster (Freifunk Düsseldorf)
Expand Down