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

feat: better composite action #611

Merged
merged 20 commits into from
Mar 18, 2025
Merged
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
3 changes: 3 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"edkii",
"elif",
"emeraldlake",
"endgroup",
"exitcode",
"filenamify",
"githubaction",
Expand Down Expand Up @@ -119,6 +120,7 @@
"markdownlint",
"megalinter",
"menuconfig",
"mktemp",
"modifyitems",
"mountpoint",
"multilib",
Expand All @@ -138,6 +140,7 @@
"pylint",
"pytest",
"rdparty",
"readarray",
"rootdir",
"runslow",
"rustup",
Expand Down
74 changes: 30 additions & 44 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,13 @@ jobs:
target: 'coreboot-example'
recursive: 'false'
compile: ${{ needs.changes.outputs.compile }}
debug: 'true'
enable-cache: 'true'
auto-download-artifacts: 'true'
auto-upload-artifacts: 'true'
env:
COREBOOT_VERSION: ${{ matrix.coreboot-version }}
UROOT_VERSION: "dummy"

- name: Get artifacts
uses: actions/upload-artifact@v4
with:
name: coreboot-${{ matrix.coreboot-version }}-${{ matrix.arch }}
path: output-coreboot
retention-days: 14
UROOT_VERSION: 'dummy'
# ANCHOR_END: example_build_coreboot

# Example of building Linux kernel
Expand Down Expand Up @@ -237,17 +234,14 @@ jobs:
target: 'linux-example'
recursive: 'false'
compile: ${{ needs.changes.outputs.compile }}
debug: 'true'
enable-cache: 'true'
auto-download-artifacts: 'true'
auto-upload-artifacts: 'true'
env:
LINUX_VERSION: ${{ matrix.linux-version }}
SYSTEM_ARCH: ${{ matrix.arch }}
UROOT_VERSION: "dummy"

- name: Get artifacts
uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.linux-version }}-${{ matrix.arch }}
path: output-linux
retention-days: 14
UROOT_VERSION: 'dummy'
# ANCHOR_END: example_build_linux_kernel

# Example of building EDK2
Expand Down Expand Up @@ -317,16 +311,13 @@ jobs:
target: 'edk2-example'
recursive: 'false'
compile: ${{ needs.changes.outputs.compile }}
debug: 'true'
enable-cache: 'true'
auto-download-artifacts: 'true'
auto-upload-artifacts: 'true'
env:
EDK2_VERSION: ${{ matrix.edk2-version }}
GCC_TOOLCHAIN_VERSION: ${{ steps.gcc_toolchain.outputs.gcc_toolchain_version }}

- name: Get artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.edk2-version }}
path: output-edk2
retention-days: 14
# ANCHOR_END: example_build_edk2

# Example of building Firmware Stitching
Expand Down Expand Up @@ -376,15 +367,12 @@ jobs:
target: 'stitching-example'
recursive: 'false'
compile: ${{ needs.changes.outputs.compile }}
debug: 'true'
enable-cache: 'true'
auto-download-artifacts: 'true'
auto-upload-artifacts: 'true'
env:
COREBOOT_VERSION: ${{ matrix.coreboot-version }}

- name: Get artifacts
uses: actions/upload-artifact@v4
with:
name: stitch-${{ matrix.coreboot-version }}-${{ matrix.arch }}
path: output-stitch
retention-days: 14
# ANCHOR_END: example_build_stitch

# Example of building u-root
Expand Down Expand Up @@ -434,15 +422,12 @@ jobs:
target: 'u-root-example'
recursive: 'false'
compile: ${{ needs.changes.outputs.compile }}
debug: 'true'
enable-cache: 'true'
auto-download-artifacts: 'true'
auto-upload-artifacts: 'true'
env:
UROOT_VERSION: ${{ matrix.uroot-version }}

- name: Get artifacts
uses: actions/upload-artifact@v4
with:
name: uroot-${{ matrix.uroot-version }}-${{ matrix.arch }}
path: output-uroot
retention-days: 14
# ANCHOR_END: example_build_uroot

# Example of building u-boot
Expand Down Expand Up @@ -499,15 +484,12 @@ jobs:
target: 'u-boot-example'
recursive: 'false'
compile: ${{ needs.changes.outputs.compile }}
debug: 'true'
enable-cache: 'true'
auto-download-artifacts: 'true'
auto-upload-artifacts: 'true'
env:
UBOOT_VERSION: ${{ matrix.uboot-version }}

- name: Get artifacts
uses: actions/upload-artifact@v4
with:
name: uboot-${{ matrix.uboot-version }}-${{ matrix.arch }}
path: output-uboot
retention-days: 14
# ANCHOR_END: example_build_uboot

# Example of using universal module
Expand Down Expand Up @@ -634,6 +616,10 @@ jobs:
target: 'u-root-example'
recursive: 'false'
compile: ${{ needs.changes.outputs.compile }}
debug: 'true'
enable-cache: 'true'
auto-download-artifacts: 'true'
auto-upload-artifacts: 'true'
env:
COREBOOT_VERSION: '4.19'
LINUX_VERSION: '6.9.9'
Expand Down
2 changes: 2 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ tasks:
dir: '{{.GOLANG_CODE_PATH}}'
cmds:
- go build -ldflags="-s -w -X main.version={{.VERSION}} -X main.commit={{.COMMIT}} -X main.date={{.DATE}}" -o ../../bin/firmware-action-{{OS}}-{{ARCH}}-v{{.VERSION}}
- ln -sf ./firmware-action-{{OS}}-{{ARCH}}-v{{.VERSION}} ../../bin/firmware-action
env:
CGO_ENABLED: 0
sources:
Expand Down Expand Up @@ -67,6 +68,7 @@ tasks:
dir: docs
cmds:
- mdbook build
- echo "Visit file://{{.USER_WORKING_DIR}}/docs/public/index.html"

build-mdbook-watch:
desc: Build mdBook with watch
Expand Down
Loading
Loading