-
Notifications
You must be signed in to change notification settings - Fork 0
VsCode task runner with 1 click FC Docker image builder and compiling script. #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
stuckatmarine
wants to merge
7
commits into
master
Choose a base branch
from
bug/FC/235/Code-Taskrunner-and-FC-Docker-Caching
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d760ba6
move pi setup commands to Dockerfile to get caching
stuckatmarine 3e9c213
clang install cached, helloTest.sh added to /usr/loca/bin
stuckatmarine f9999ef
old a.out and .bak files removed, README updated with new run command
stuckatmarine b492b06
add chmod +x to helloTest.sh
stuckatmarine c6ed657
vs code taskrunner and FC compiling added
stuckatmarine 667a6b4
clarify path to be replaced in readme for compiling
stuckatmarine 2984d01
fix -x error in hello script chmod
stuckatmarine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "echoTest", | ||
"type": "shell", | ||
"command": "echo 'Hello taskrunner test good.'", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "build FC Image", | ||
"type": "shell", | ||
"command": "docker build -t pi_fc:v1 SetupScriptPlusDockerfile/.", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "compile and run FC HelloWorld", | ||
"type": "shell", | ||
"command": "docker run -it -v /c/hyperloop/comp5-software/OnPod/FlightComputer:/home/data --entrypoint helloTest.sh pi_fc:v1", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Flight Computer devlopment | ||
- Ensure Docker is installed and running on your machine | ||
## Taskrunner setup for VsCode | ||
- install VsCode `Tasks' extension by actboy168 | ||
- open comp5-software\OnPod\FlightComputer folder with VsCode | ||
- replace the folder bath in .vscode/tasks.json line 28 command:`compile and run RC HelloWorld`, with your path. replace this -> `/c/hyperloop/comp5-software/OnPod/FlightComputer` | ||
- Try task buttons in blue taskbar at bottom of VsCode window: | ||
`echoTest` // should print `Hello taskrunner test good.` | ||
`build FC Image` // should build FC image `pi_fc:v1` | ||
`compile and run RC HellowWorld` // should print `---- Hello Paradigm!!! ----` | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,27 @@ | ||
FROM raspbian/stretch:latest | ||
|
||
COPY piSetup.sh . | ||
RUN sudo apt update -y && \ | ||
sudo apt upgrade -y | ||
|
||
RUN ./piSetup.sh | ||
RUN sudo apt-get install -y \ | ||
git \ | ||
make \ | ||
curl \ | ||
xz-utils \ | ||
libstdc++6-4.6-dev | ||
|
||
COPY clangSetup.sh /home | ||
RUN cd ~ && \ | ||
wget http://releases.llvm.org/9.0.0/clang+llvm-9.0.0-armv7a-linux-gnueabihf.tar.xz && \ | ||
tar -xvf clang+llvm-9.0.0-armv7a-linux-gnueabihf.tar.xz && \ | ||
rm clang+llvm-9.0.0-armv7a-linux-gnueabihf.tar.xz && \ | ||
mv clang+llvm-9.0.0-armv7a-linux-gnueabihf clang_9.0.0 && \ | ||
sudo mv clang_9.0.0 /usr/local && \ | ||
echo 'export PATH=/usr/local/clang_9.0.0/bin:$PATH' >> ~/.bashrc && \ | ||
echo 'export LD_LIBRARY_PATH=/usr/local/clang_9.0.0/lib:$LD_LIBRARY_PATH' >> ~/.bashrc && \ | ||
. ~/.bashrc && \ | ||
clang++ --version | ||
|
||
COPY helloTest.sh /usr/local/bin/ | ||
RUN sed -i.bak 's/\r$//' /usr/local/bin/helloTest.sh && \ | ||
chmod +X /usr/local/bin/helloTest.sh | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
## custom aliases | ||
# test c++ compilation | ||
. ~/.bashrc | ||
cd ~ | ||
clang++ /home/data/SetupScriptPlusDockerfile/test_main.cpp | ||
./a.out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
int main() | ||
{ | ||
std::cout << "Hello Paradigm\n"; | ||
std::cout << "\n---- Hello Paradigm!!! ----\n\n"; | ||
|
||
return 0; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.