aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-11-05 14:18:43 -0700
committerSelene ToyKeeper2023-11-05 14:18:43 -0700
commit0a94d3e8c5e3def1c8a8e2d1763be38f0edf5a7d (patch)
treea47cef268e282a679af606b0a2865427110b6908
parentmake clean: don't remove files in arch/dfp/ (diff)
parentremoved test branch from action triggers (diff)
downloadanduril-0a94d3e8c5e3def1c8a8e2d1763be38f0edf5a7d.tar.gz
anduril-0a94d3e8c5e3def1c8a8e2d1763be38f0edf5a7d.tar.bz2
anduril-0a94d3e8c5e3def1c8a8e2d1763be38f0edf5a7d.zip
Merge branch 'gretel-actions' into trunk
adds basic CI to ensure all build targets compile * gretel-actions: removed test branch from action triggers (the action works and seems ready to merge) test: is apt-get any faster than apt? github actions: cache the Atmel DFP files between runs fixed intentional error, because CI build-fail test worked correctly help CI detect build failures initial test to fix branch names and see if actions work basic compile workflow publishing artifacts to test
Diffstat (limited to '')
-rw-r--r--.github/workflows/compile.yml49
-rwxr-xr-xbin/build-all.sh1
-rwxr-xr-xmake4
3 files changed, 52 insertions, 2 deletions
diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml
new file mode 100644
index 0000000..fabcf31
--- /dev/null
+++ b/.github/workflows/compile.yml
@@ -0,0 +1,49 @@
+name: build all
+
+on:
+ push:
+ branches: [ "trunk" ]
+ pull_request:
+ branches: [ "trunk" ]
+
+jobs:
+ compile:
+ runs-on: ubuntu-latest
+
+ steps:
+
+ - name: Checkout
+ uses: actions/checkout@master
+
+ - name: Requirements
+ run: |
+ sudo apt-get -qqy update
+ sudo apt-get -qqy install avr-libc binutils-avr gcc-avr unzip wget
+
+ - name: Cache Atmel DFPs
+ id: cache-dfp
+ uses: actions/cache@v3
+ env:
+ cache-name: cache-dfp-files
+ with:
+ path: arch/dfp
+ # new cache whenever the dfp-install script changes
+ key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('bin/dfp-install.sh') }}
+
+ - name: Install Atmel DFPs
+ if: steps.cache-dfp.outputs.cache-hit != 'true'
+ run: |
+ ./make dfp
+
+ - name: Compile All
+ run: |
+ ./make
+ echo "ARTIFACT_NAME=${GITHUB_WORKFLOW}-${GITHUB_REF_NAME}-$(git rev-parse --short ${GITHUB_SHA})-${GITHUB_RUN_NUMBER}" >> "${GITHUB_ENV}"
+
+ - name: Store Artifacts
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ env.ARTIFACT_NAME }}
+ if-no-files-found: error
+ path: |
+ hex/*.hex
diff --git a/bin/build-all.sh b/bin/build-all.sh
index 2d443a5..ac8ea98 100755
--- a/bin/build-all.sh
+++ b/bin/build-all.sh
@@ -66,4 +66,5 @@ echo "===== $PASS builds succeeded, $FAIL failed ====="
#echo "PASS: $PASSED"
if [ 0 != $FAIL ]; then
echo "FAIL:$FAILED"
+ exit 1
fi
diff --git a/make b/make
index 8d3d801..89e196d 100755
--- a/make
+++ b/make
@@ -59,7 +59,7 @@ function main() {
;;
dfp)
shift
- ./bin/dfp-install.sh "$@"
+ exec ./bin/dfp-install.sh "$@"
;;
docs)
make-docs
@@ -79,7 +79,7 @@ function main() {
grep -E 'TODO:|FIXME:' **/*.[ch]
;;
*)
- ./bin/build-all.sh "$@"
+ exec ./bin/build-all.sh "$@"
;;
esac
}