-
Notifications
You must be signed in to change notification settings - Fork 1
115 lines (95 loc) · 3.12 KB
/
deploy_rovecomm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Build and Create RoveComm Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
pull-requests: read
packages: read
id-token: write
concurrency:
group: "create-release"
cancel-in-progress: false
jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Copy Repository to /opt
shell: bash
run: |
mkdir -p /opt/RoveComm_CPP
cp -r . /opt/RoveComm_CPP
- name: Fix Dubious Ownership
run: git config --global --add safe.directory /opt/RoveComm_CPP
- name: Checkout Tag
run: |
ls /opt
cd /opt/RoveComm_CPP
git fetch --tags --force
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo $tag
git checkout $tag
- name: Install Project Dependencies
run: |
sudo apt update && sudo apt install libeigen3-dev
wget -q https://github.com/MissouriMRDT/Autonomy_Packages/raw/main/quill/amd64/quill_${QUILL_VERSION}_amd64.deb
sudo dpkg -i quill_${QUILL_VERSION}_amd64.deb
rm quill_${QUILL_VERSION}_amd64.deb
wget -q https://github.com/MissouriMRDT/Autonomy_Packages/raw/main/gtest/amd64/gtest_${GTEST_VERSION}_amd64.deb
sudo dpkg -i gtest_${GTEST_VERSION}_amd64.deb
rm gtest_${GTEST_VERSION}_amd64.deb
env:
QUILL_VERSION: "3.6.0"
GTEST_VERSION: "1.14.0"
- name: Build and Create Executable
run: |
cd /opt/RoveComm_CPP/
if [ -d "build" ]; then rm -Rf build; fi
mkdir build
cd build
cmake ..
make
make package
- name: Rename Executable
run: mv /opt/RoveComm_CPP/build/RoveComm_CPP**.sh /opt/RoveComm_CPP/build/RoveComm_CPP_AMD64.sh
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: RoveComm-AMD64
path: /opt/RoveComm_CPP/build/RoveComm_CPP_AMD64.sh
create-release:
runs-on: ubuntu-latest
needs: build-and-upload
steps:
- uses: actions/checkout@v4
- name: Checkout repository to /opt
shell: bash
run: cp -r . /opt/
- name: Fix Dubious Ownership
run: git config --global --add safe.directory /opt/RoveComm_CPP
- name: Determine Version
id: version
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Create Directory
run: mkdir -p /opt/RoveComm_CPP/artifacts/
- name: Download Artifacts
uses: actions/download-artifact@v4
id: download
with:
path: /opt/RoveComm_CPP/artifacts/
- name: Display Structure
run: ls
working-directory: /opt/RoveComm_CPP/artifacts/
- name: Create Release
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
name: "${{ steps.version.outputs.version }}"
files: "/opt/RoveComm_CPP/artifacts/**"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}