diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 3a0ebec8..eb986b64 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -13,12 +13,10 @@ jobs: matrix: model: ["TS100", "TS80", "TS80P", "Pinecil", "MHP30", "Pinecilv2", "S60", "TS101"] fail-fast: true - outputs: - current_date: ${{ steps.get_date.outputs.CURRENT_DATE }} steps: - name: Install dependencies (apk) - run: apk add --no-cache gcc-riscv-none-elf gcc-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi findutils python3 py3-pip make git bash tar date + run: apk add --no-cache gcc-riscv-none-elf gcc-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi findutils python3 py3-pip make git bash - name: Install dependencies (python) run: python3 -m pip install bdflib @@ -54,17 +52,11 @@ jobs: - name: Generate json index file run: ./source/metadata.py ${{ matrix.model }}.json - - name: Get date to tag cache with unique key - id: get_date - run: | - echo "CURRENT_DATE=$(date +'%Y-%m-%d %H:%M:%S.%N')" >> $GITHUB_OUTPUT - - - name: Cache ${{ matrix.model }} index file - uses: actions/cache/save@v3 + - name: Archive ${{ matrix.model }} index file + uses: actions/upload-artifact@v4 with: + name: metadata-${{ matrix.model }} path: source/Hexfile/${{ matrix.model }}.json - key: metadata_${{ matrix.model }} - enableCrossOsArchive: true build_multi-lang: @@ -75,12 +67,10 @@ jobs: matrix: model: ["Pinecil", "Pinecilv2"] fail-fast: true - outputs: - current_date: ${{ steps.get_date.outputs.CURRENT_DATE }} 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 tar date + 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 @@ -115,17 +105,11 @@ jobs: - name: Generate json index file run: ./source/metadata.py ${{ matrix.model }}_multi-lang.json - - name: Get date to tag cache with unique key - id: get_date - run: | - echo "CURRENT_DATE=$(date +'%Y-%m-%d %H:%M:%S.%N')" >> $GITHUB_OUTPUT - - - name: Cache ${{ matrix.model }} index file - uses: actions/cache/save@v3 + - name: Archive ${{ matrix.model }} index file + uses: actions/upload-artifact@v4 with: + name: metadata-${{ matrix.model }}_multi-lang path: source/Hexfile/${{ matrix.model }}_multi-lang.json - key: metadata_${{ matrix.model }}_multi-lang - enableCrossOsArchive: true upload_metadata: @@ -133,29 +117,15 @@ jobs: runs-on: ubuntu-20.04 steps: - - name: Restore cached JSONs from build - uses: actions/cache/restore@v3 + - name: Download All JSONs + uses: actions/download-artifact@v4 with: path: metadata - key: metadata-${{ needs.build.outputs.current_date }} - - run: ls -R ; ls -R metadata || true + pattern: metadata-* + merge-multiple: true + - run: ls -R metadata - - name: Restore cached JSONs from build_multi-lang - uses: actions/cache/restore@v3 - with: - path: metadata - key: metadata_multi-lang-${{ needs.build_multi-lang.outputs.current_date }} - - run: ls -R ; ls -R metadata || true - - - name: TESTING - uses: actions/cache/restore@v3 - with: - path: metadata - key: metadata_TS80 - enableCrossOsArchive: true - - run: ls -R ; ls -R metadata || true - - - name: Upload JSONs in bulk + - name: Re-upload JSONs in bulk uses: actions/upload-artifact@v4 with: name: metadata