Refine Github action artifacts #202
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 the Pico Assembly | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
compile_job: | |
name: build_pico_assembly | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/lasp/adamant_example:latest | |
options: --user root | |
steps: | |
- run: echo "Starting job triggered by a ${{ github.event_name }} event on a ${{ runner.os }} server hosted by GitHub." | |
- run: echo "Checking out ${{ github.repository }} on branch ${{ github.ref }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
set-safe-directory: true | |
path: adamant_example | |
- name: Clone adamant repository | |
uses: actions/checkout@v4 | |
with: | |
set-safe-directory: true | |
repository: lasp/adamant | |
path: adamant | |
- name: Build the Pico binary | |
run: bash adamant_example/env/github_run.sh "redo adamant_example/src/assembly/pico/main/build/bin/Pico/main.uf2" | |
- name: Archive Pico binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pico_elf | |
path: | | |
adamant_example/src/assembly/pico/main/build/bin/Pico/main.elf | |
adamant_example/src/assembly/pico/main/build/bin/Pico/main.uf2 | |
if-no-files-found: error | |
- run: echo "Finished with status - ${{ job.status }}." |