Skip to content

Commit

Permalink
[CI] enhancement: added pull request workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Shreyas Atre <[email protected]>
  • Loading branch information
SAtacker committed Jun 10, 2022
1 parent 5ad5912 commit f9979b0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: armhf build
name: armhf release

on:
push:
Expand Down Expand Up @@ -29,13 +29,12 @@ jobs:
-DCMAKE_C_COMPILER=$(which arm-linux-gnueabihf-gcc-8) \
-DARMHF_DEB=ON \
-DARCHITECTURE="armhf" \
-DGIT_VERSION=${{ github.ref }}
-DGIT_VERSION=$(echo ${{ github.ref }} | grep -o v'[0-9]\+\.[0-9]\+\.[0-9]\+')
make -j$(nproc)
make package
armhf__filename__=$(echo $(ls ${{steps.armhf-artifact-download.outputs.download-path}} | grep ..armhf.deb) | tr -d '\n')
version__name__=${armhf__filename__#*-}
name__=$(echo ${armhf__filename__%-*} | tr -d '\n')
version__=${{ github.ref }}
version__=$(echo ${{ github.ref }} | grep -o v'[0-9]\+\.[0-9]\+\.[0-9]\+')
echo "name__=$name__" >> $GITHUB_ENV
echo "version__=$version__" >> $GITHUB_ENV
echo "armhf__filename__=$armhf__filename__" >> $GITHUB_ENV
Expand All @@ -45,8 +44,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
tag_name: ${{ env.version__ }}
release_name: Release ${{ env.version__ }}
draft: false
prerelease: false
- name: Upload Release Asset
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/pull_request_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test Build
on:
pull_request:
types: [ assigned, opened, synchronize, reopened ]

jobs:
armhf:
name: build-armhf
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Deps
run: sudo apt install gcc-8-arm-linux-gnueabihf g++-8-arm-linux-gnueabihf
- name: Build
run: |
cd ${{ github.workspace }}
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=$(which arm-linux-gnueabihf-g++-8) \
-DCMAKE_C_COMPILER=$(which arm-linux-gnueabihf-gcc-8) \
-DARMHF_DEB=ON \
-DARCHITECTURE="armhf"
make -j$(nproc)

0 comments on commit f9979b0

Please sign in to comment.