Skip to content

Commit

Permalink
push.yml: upload_metadata: download prebuilt artifacts, generate json…
Browse files Browse the repository at this point in the history
…s, upload them as metadata.zip - Work in Progress
  • Loading branch information
ia committed Dec 20, 2023
1 parent a290735 commit 1dbbd24
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
steps:
- name: Install dependencies (apk)
run: apk add --no-cache gcc-riscv-none-elf newlib-riscv-none-elf findutils python3 py3-pip make git bash musl-dev

- name: Install dependencies (python)
run: python3 -m pip install bdflib

Expand Down Expand Up @@ -117,21 +118,46 @@ jobs:
upload_metadata:
needs: [build, build_multi-lang]
runs-on: ubuntu-20.04
container:
image: alpine:3.16
strategy:
matrix:
model: ["TS100", "TS80", "TS80P", "Pinecil", "MHP30", "Pinecilv2", "S60", "TS101", "Pinecil_multi-lang", "Pinecilv2_multi-lang"]
fail-fast: true

steps:
- name: Install dependencies (apk)
run: apk add --no-cache findutils python3 py3-pip make git bash

- name: Install dependencies (python)
run: python3 -m pip install bdflib

- name: Download All JSONs
- uses: actions/checkout@v4
with:
submodules: true

- name: Git ownership exception
run: git config --global --add safe.directory /__w/IronOS/IronOS && git config --global safe.directory "$GITHUB_WORKSPACE"

- name: Git meta info
run: echo "GITHUB_CI_PR_SHA=${{github.event.pull_request.head.sha}}" >> "${GITHUB_ENV}"

- name: Download all prebuilts
uses: actions/download-artifact@v4
with:
path: metadata
pattern: .metadata-*
path: source/Hexfile/
pattern: *
merge-multiple: true
- run: ls -R metadata
- run: ls -R source/Hexfile

- name: Generate JSON files
run: ./source/metadata.py ${{ matrix.model }}.json

- name: Re-upload JSONs in bulk
- name: Upload JSONs in bulk as metadata
uses: actions/upload-artifact@v4
with:
name: metadata
path: metadata/*
path: source/Hexfile/*.json
if-no-files-found: error


Expand Down

0 comments on commit 1dbbd24

Please sign in to comment.