From 5cc72c162a0b7f73748fd85561922c2bdeec5eb8 Mon Sep 17 00:00:00 2001 From: Nat Moore Date: Fri, 14 Oct 2022 13:42:33 -0500 Subject: [PATCH] add GH actions; --- .github/workflows/tarball.yml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index c8fd3f48..6cd9abc6 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -3,7 +3,12 @@ name: dvmhost-build-tarball # Controls when the workflow will run on: # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: + #workflow_dispatch: + #run on push/PR + push: + branches: [ master ] + pull_request: + branches: [ master ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -23,16 +28,22 @@ jobs: uses: actions/checkout@v2 - name: Install Dependencies - run: sudo apt-get install -y gcc-arm-none-eabi build-essential devscripts debhelper + run: sudo apt-get install -y gcc-arm-none-eabi cmake build-essential devscripts debhelper - name: Sync Git Submodules run: git submodule init && git submodule update - name: Change /opt Permissions run: sudo chmod 777 /opt + + - name: Change to build directory + run: mkdir build && cd build + + - name: Generate build files with CMake + run: cmake .. - - name: Build Debian Package - run: make tarball + - name: Build binaries + run: make - name: Package Hash run: | @@ -41,11 +52,11 @@ jobs: echo >> release.txt echo '```' >> release.txt cat << EOF >> release.txt - dvmhost_1.0.0.tar.gz - size : $(wc -c dvmhost_1.0.0.tar.gz) - md5 : $(md5sum dvmhost_1.0.0.tar.gz) - sha1 : $(sha1sum dvmhost_1.0.0.tar.gz) - sha256: $(sha256sum dvmhost_1.0.0.tar.gz) + dvmhost + size : $(wc -c dvmhost) + md5 : $(md5sum dvmhost) + sha1 : $(sha1sum dvmhost) + sha256: $(sha256sum dvmhost) EOF echo '```' >> release.txt @@ -55,4 +66,4 @@ jobs: tag_name: ${{steps.date.outputs.date}} body_path: release.txt files: | - dvmhost_1.0.0.tar.gz + dvmhost