Fixes GitHub CI

wch-ch32v003
Felix "xq" Queißner 9 months ago
parent 6eccd8fd95
commit 2f6a61e6ae

@ -1,4 +1,5 @@
name: Build
name: Continuous Integration
on:
push:
branches: [main]
@ -6,33 +7,32 @@ on:
branches: [main]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
dir:
- all-platforms
- raspberrypi-rp2040
- espressif-esp
- nxp-lpc
- microchip-atmega
- gigadevice-gd32
- nordic-nrf5x
- stmicro-stm32
os:
- windows-latest
- macos-latest
- ubuntu-latest
generate-packages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-tags: true # required for "git describe"
- name: Fetch more data from git
run: |
# fetch everything back till the 0.11.0 tag.
# https://stackoverflow.com/a/58082274
git fetch --shallow-exclude 0.11.0
git fetch --deepen=2
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.11.0
- name: Build examples
working-directory: ${{ matrix.dir }}
run: zig build
- name: Generate and validate packages
run: |
./tools/bundle.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: packages
path: microzig-deploy/

@ -5,14 +5,14 @@
# Creates all packages into /microzig-deploy with the final folder structure.
#
set -euo pipefail
set -eu
all_files_dir=".data"
# test for all required tools:
which zig date find jq mkdir dirname realpath > /dev/null
[ "$(zig version)" == "0.11.0" ]
[ "$(zig version)" = "0.11.0" ]
repo_root="$(dirname "$(dirname "$(realpath "$0")")")"
[ -d "${repo_root}" ]
@ -32,7 +32,7 @@ git_description="$(git describe --match "*.*.*" --tags --abbrev=9)"
version=""
# render-version <major> <minor> <patch> <counter> <hash>
function render_version()
render_version()
{
[ "$#" -eq 5 ]
echo "$1.$2.$3-$4-$5"
@ -132,7 +132,7 @@ for dir in $(find -type f -name microzig-package.json -exec dirname '{}' ';'); d
create_package "${dir}" "${out_path}"
# get some required metadata
file_hash=($(sha256sum "${out_path}" | cut -f 1))
file_hash="$(sha256sum "${out_path}" | cut -d " " -f 1)"
file_size="$(stat --format="%s" "${out_path}")"
pkg_info="$(archive_info ${out_path})"

@ -1,6 +1,6 @@
#!/bin/sh
set -euo pipefail
set -eu
# test for all required tools:
which tar gzip jq basename dirname realpath > /dev/null

Loading…
Cancel
Save