Skip to content

Commit

Permalink
Fix workflow build
Browse files Browse the repository at this point in the history
  • Loading branch information
amakuzaze committed May 5, 2022
1 parent 750abff commit 030d556
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- name: Determine version
id: version_id
run: echo "::set-output name=value::$(git describe --always --tags --dirty)"
- name: Generate parser
run: "./gen_parser.sh"
- name: Build firmware
uses: espressif/[email protected]
env:
Expand All @@ -29,7 +31,7 @@ jobs:
draft: false
prerelease: false
release_name: lizard_${{ steps.version_id.outputs.value }}
tag_name: lizard_${{ steps.version_id.outputs.value }}
tag_name: ${{ steps.version_id.outputs.value }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload artifacts
Expand All @@ -38,7 +40,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/*.bin
asset_path: build/lizard.bin
asset_name: lizard_${{ steps.version_id.outputs.value }}.bin
asset_content_type: application/octet-stream

Expand Down
18 changes: 1 addition & 17 deletions compile.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
#!/usr/bin/env bash

echo "Generating parser..."
if [[ "language.owl" -nt main/parser.h ]]
then
pushd owl
make
popd
mv owl/owl ./owl_executable

./owl_executable -c language.owl -o main/parser.h
if [[ $? -ne 0 ]]
then
rm -f main/parser.h
exit 1
fi
else
echo "Nothing to do."
fi
./gen_parser.sh

echo "Compiling Lizard..."
docker run --rm -v $PWD:/project -w /project espressif/idf:v4.4 idf.py build || exit 1
19 changes: 19 additions & 0 deletions gen_parser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

echo "Generating parser..."
if [[ "language.owl" -nt main/parser.h ]]
then
pushd owl
make
popd
mv owl/owl ./owl_executable

./owl_executable -c language.owl -o main/parser.h
if [[ $? -ne 0 ]]
then
rm -f main/parser.h
exit 1
fi
else
echo "Nothing to do."
fi

0 comments on commit 030d556

Please sign in to comment.