Skip to content

Commit 92fbe67

Browse files
authored
ble reception working (#1)
1 parent b73d6ea commit 92fbe67

File tree

5 files changed

+194
-443
lines changed

5 files changed

+194
-443
lines changed

.github/workflows/main.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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

build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
set -e
33

44
zig 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

0 commit comments

Comments
 (0)