File tree Expand file tree Collapse file tree 5 files changed +194
-443
lines changed
Expand file tree Collapse file tree 5 files changed +194
-443
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push]
4+
5+ jobs :
6+ build :
7+
8+ runs-on : ubuntu-latest
9+
10+ steps :
11+ - uses : actions/checkout@v1
12+ - name : install software
13+ run : |
14+ sudo apt-get -qq install llvm srecord
15+ ls -lt /usr/bin/llvm-objcopy*
16+
17+ wget --quiet --output-document=- https://github.com/github/hub/releases/download/v2.12.3/hub-linux-amd64-2.12.3.tgz | tar zx
18+ mv hub-linux-* hub
19+ ./hub/bin/hub --version
20+
21+ ZIG=$(wget --quiet --output-document=- https://ziglang.org/download/index.json | jq --raw-output '.master."x86_64-linux".tarball')
22+ wget --quiet --output-document=- $ZIG | tar Jx
23+ mv zig-linux-x86_64-* zig
24+ echo zig version $(./zig/zig version)
25+ - name : build
26+ run : |
27+ export PATH=./zig:$PATH
28+ ./build.sh
29+ mkdir release
30+ cp main.hex release
31+ - name : release draft
32+ env :
33+ GITHUB_USER : $GITHUB_ACTOR
34+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35+ run : |
36+ REPO=$(basename $GITHUB_REPOSITORY)
37+ RELEASE_TAG=$(grep '^const release_tag =' main.zig | sed 's/";//' | sed 's/^.*"//')
38+ RELEASE_ASSET=$REPO-$RELEASE_TAG.zip
39+ pushd release
40+ echo $RELEASE_TAG > RELEASE.md
41+ echo >> RELEASE.md
42+ cat ../release-message.md >> RELEASE.md
43+ zip -r $RELEASE_ASSET .
44+ ../hub/bin/hub release create --draft --prerelease --file RELEASE.md --attach $RELEASE_ASSET $RELEASE_TAG
45+ popd
Original file line number Diff line number Diff line change 22set -e
33
44zig build-exe -target armv6m-freestanding-eabihf --linker-script linker.ld main.zig
5- llvm-objcopy main -O ihex main.bin
5+ ls -lt main
6+ llvm-objcopy-6.0 main -O binary main.bin
7+ ls -lt main.bin
8+ srec_cat main.bin -Binary -Output main.hex -Intel
9+ ls -lt main.hex
You can’t perform that action at this time.
0 commit comments