Skip to content

Commit

Permalink
ble reception working (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
markfirmware committed Nov 20, 2019
1 parent b73d6ea commit 92fbe67
Show file tree
Hide file tree
Showing 5 changed files with 194 additions and 443 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: install software
run: |
sudo apt-get -qq install llvm srecord
ls -lt /usr/bin/llvm-objcopy*
wget --quiet --output-document=- https://github.com/github/hub/releases/download/v2.12.3/hub-linux-amd64-2.12.3.tgz | tar zx
mv hub-linux-* hub
./hub/bin/hub --version
ZIG=$(wget --quiet --output-document=- https://ziglang.org/download/index.json | jq --raw-output '.master."x86_64-linux".tarball')
wget --quiet --output-document=- $ZIG | tar Jx
mv zig-linux-x86_64-* zig
echo zig version $(./zig/zig version)
- name: build
run: |
export PATH=./zig:$PATH
./build.sh
mkdir release
cp main.hex release
- name: release draft
env:
GITHUB_USER: $GITHUB_ACTOR
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
REPO=$(basename $GITHUB_REPOSITORY)
RELEASE_TAG=$(grep '^const release_tag =' main.zig | sed 's/";//' | sed 's/^.*"//')
RELEASE_ASSET=$REPO-$RELEASE_TAG.zip
pushd release
echo $RELEASE_TAG > RELEASE.md
echo >> RELEASE.md
cat ../release-message.md >> RELEASE.md
zip -r $RELEASE_ASSET .
../hub/bin/hub release create --draft --prerelease --file RELEASE.md --attach $RELEASE_ASSET $RELEASE_TAG
popd
6 changes: 5 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
set -e

zig build-exe -target armv6m-freestanding-eabihf --linker-script linker.ld main.zig
llvm-objcopy main -O ihex main.bin
ls -lt main
llvm-objcopy-6.0 main -O binary main.bin
ls -lt main.bin
srec_cat main.bin -Binary -Output main.hex -Intel
ls -lt main.hex
Loading

0 comments on commit 92fbe67

Please sign in to comment.