build toolchain cache #6
This file contains 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 toolchain cache | |
on: | |
workflow_dispatch: | |
inputs: | |
openwrt_version: | |
description: "OpenWrt version" | |
type: string | |
required: true | |
default: "23.05.3" | |
openwrt_arch: | |
description: "OpenWrt arch" | |
type: string | |
required: true | |
default: "mips_24kc" | |
openwrt_target: | |
description: "OpenWrt target" | |
type: string | |
required: true | |
default: "ath79" | |
openwrt_subtarget: | |
description: "OpenWrt subtarget" | |
type: string | |
required: true | |
default: "generic" | |
openwrt_vermagic: | |
description: "OpenWrt vermagic" | |
type: string | |
required: true | |
default: "auto" | |
jobs: | |
build: | |
name: "v${{ matrix.build_env.tag }} - ${{ matrix.build_env.pkgarch }} :: ${{ matrix.build_env.target }}/${{ matrix.build_env.subtarget }} openwrt build" | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
build_env: | |
- tag: ${{ inputs.openwrt_version }} | |
pkgarch: ${{ inputs.openwrt_arch }} | |
target: ${{ inputs.openwrt_target }} | |
subtarget: ${{ inputs.openwrt_subtarget }} | |
vermagic: ${{ inputs.openwrt_vermagic }} | |
env: | |
OPENWRT_RELEASE: ${{ matrix.build_env.tag }} | |
OPENWRT_ARCH: ${{ matrix.build_env.pkgarch }} | |
OPENWRT_TARGET: ${{ matrix.build_env.target }} | |
OPENWRT_SUBTARGET: ${{ matrix.build_env.subtarget }} | |
OPENWRT_VERMAGIC: ${{ matrix.build_env.vermagic }} | |
steps: | |
- name: checkout amneziawg-openwrt | |
uses: actions/checkout@v4 | |
with: | |
path: amneziawg-openwrt | |
fetch-depth: 0 | |
- name: checkout openwrt | |
uses: actions/checkout@v4 | |
with: | |
path: openwrt | |
repository: openwrt/openwrt | |
ref: v${{ matrix.build_env.tag }} | |
fetch-depth: 0 | |
- name: building toolchain and kernel | |
id: build-toolchain-kernel | |
run: | | |
set -x | |
cd amneziawg-openwrt | |
make show-env | |
time -p make build-toolchain | |
time -p make build-kernel | |
make purge-circular-symlinks | |
- name: save toolchain and kernel cache | |
id: cache-tools-kernel-save | |
uses: actions/cache/save@v4 | |
with: | |
key: ${{ runner.os }}-openwrt-cache-toolchain-kernel-${{ matrix.build_env.tag }}-${{ matrix.build_env.pkgarch }}-${{ matrix.build_env.target }}-${{ matrix.build_env.subtarget }} | |
path: | | |
openwrt/.config | |
openwrt/.config.old | |
openwrt/feeds.conf | |
openwrt/bin/** | |
openwrt/build_dir/** | |
openwrt/dl/** | |
openwrt/feeds/** | |
openwrt/package/** | |
openwrt/staging_dir/** | |
openwrt/tmp/** |