Skip to content

Commit f9979b0

Browse files
committed
[CI] enhancement: added pull request workflows
Signed-off-by: Shreyas Atre <shreyasatre16@gmail.com>
1 parent 5ad5912 commit f9979b0

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: armhf build
1+
name: armhf release
22

33
on:
44
push:
@@ -29,13 +29,12 @@ jobs:
2929
-DCMAKE_C_COMPILER=$(which arm-linux-gnueabihf-gcc-8) \
3030
-DARMHF_DEB=ON \
3131
-DARCHITECTURE="armhf" \
32-
-DGIT_VERSION=${{ github.ref }}
32+
-DGIT_VERSION=$(echo ${{ github.ref }} | grep -o v'[0-9]\+\.[0-9]\+\.[0-9]\+')
3333
make -j$(nproc)
3434
make package
3535
armhf__filename__=$(echo $(ls ${{steps.armhf-artifact-download.outputs.download-path}} | grep ..armhf.deb) | tr -d '\n')
36-
version__name__=${armhf__filename__#*-}
3736
name__=$(echo ${armhf__filename__%-*} | tr -d '\n')
38-
version__=${{ github.ref }}
37+
version__=$(echo ${{ github.ref }} | grep -o v'[0-9]\+\.[0-9]\+\.[0-9]\+')
3938
echo "name__=$name__" >> $GITHUB_ENV
4039
echo "version__=$version__" >> $GITHUB_ENV
4140
echo "armhf__filename__=$armhf__filename__" >> $GITHUB_ENV
@@ -45,8 +44,8 @@ jobs:
4544
env:
4645
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4746
with:
48-
tag_name: ${{ github.ref }}
49-
release_name: Release ${{ github.ref }}
47+
tag_name: ${{ env.version__ }}
48+
release_name: Release ${{ env.version__ }}
5049
draft: false
5150
prerelease: false
5251
- name: Upload Release Asset
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Test Build
2+
on:
3+
pull_request:
4+
types: [ assigned, opened, synchronize, reopened ]
5+
6+
jobs:
7+
armhf:
8+
name: build-armhf
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
- name: Install Deps
15+
run: sudo apt install gcc-8-arm-linux-gnueabihf g++-8-arm-linux-gnueabihf
16+
- name: Build
17+
run: |
18+
cd ${{ github.workspace }}
19+
mkdir build
20+
cd build
21+
cmake .. -DCMAKE_CXX_COMPILER=$(which arm-linux-gnueabihf-g++-8) \
22+
-DCMAKE_C_COMPILER=$(which arm-linux-gnueabihf-gcc-8) \
23+
-DARMHF_DEB=ON \
24+
-DARCHITECTURE="armhf"
25+
make -j$(nproc)

0 commit comments

Comments
 (0)