Skip to content

Cache toolchain

Cache toolchain #8

Workflow file for this run

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: Prepare Gluon
run: make update
- name: Cache build artifacts
uses: actions/cache@v4
with:
path: |
packages
openwrt/build_dir
openwrt/staging_dir
key: ${{ env.GLUON_RELEASE }}-${{ matrix.target }}-build-deps
- name: Build Gluon Image
run: make GLUON_TARGET="${{ matrix.target }}"