-
Notifications
You must be signed in to change notification settings - Fork 3
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
[SOFT-438] Cache packages in CI #313
base: master
Are you sure you want to change the base?
Changes from 2 commits
7c9bca7
7953f8c
ad66a51
a7ffe57
c381297
1761e2e
375324c
dcee980
4429f14
88a1d4c
520e6e1
00e2721
7da46e8
4c7b30e
32c20fd
73a54ce
623178e
866d39d
d95c21b
6b3e7cb
47e2309
d2c6812
2ce2d4c
73b5756
bde17f8
ffed2f5
4b438d8
9aa1e06
5b0368c
f5a50d2
6003666
1078b51
d8d2bf5
1b1542f
79daa63
d051119
a46518c
1771bd4
92ba423
d36860e
5be91db
24a03fb
09be768
8cd2c15
7d6ef77
e1ce52c
56a55d0
33da8da
0036a3a
35b5dbb
14a3000
09a3700
bb5ee01
b372adf
485fef3
ea5faf6
396d46c
7e12b85
4656703
9a93944
6623b33
2777284
2b5fd38
8bc554f
7126ea8
b43e463
06e3b88
d696c69
c0ad42b
9f823a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,25 +19,77 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# TODO: cache all the setup | ||
|
||
- name: Setup directories | ||
run: | | ||
# create directory that will be on the PATH | ||
mkdir -p ~/.local/bin | ||
echo "${HOME}/.local/bin" >> $GITHUB_PATH | ||
mkdir -p ~/source | ||
|
||
- uses: actions/cache@v2 | ||
id: cache-gcc | ||
with: | ||
path: ~/.local/bin/gcc | ||
key: ${{ runner.os }}-gcc | ||
|
||
- uses: actions/cache@v2 | ||
id: cache-clang | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-clang | ||
|
||
- uses: actions/cache@v2 | ||
id: cache-clang-format | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-clang-format | ||
|
||
- uses: actions/cache@v2 | ||
id: cache-libc6-i386 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-libc6-i386 | ||
|
||
- uses: actions/cache@v2 | ||
id: cache-linux-module | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-linux-module | ||
|
||
- uses: actions/cache@v2 | ||
id: cache-make | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-make | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure where clang, clang-format, make, etc are installed, but it's definitely not in Also I notice there's no cache step for the installing arm-none-eabi-gcc step ( |
||
|
||
- uses: actions/cache@v2 | ||
id: cache-pip | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
|
||
- name: Install gcc, clang, clang-format | ||
run: | | ||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | ||
sudo apt-get update | ||
sudo apt-fast -y install gcc-6 | ||
sudo apt-fast -y install clang-5.0 | ||
sudo apt-fast -y install clang-format-5.0 | ||
sudo apt-fast -y install libc6-i386 | ||
# for vcan module | ||
sudo apt-fast -y install linux-modules-extra-$(uname -r) | ||
|
||
if: steps.cache-gcc.outputs.cache-hit != 'true' | ||
run: sudo apt-fast -y install gcc-6 | ||
|
||
if: steps.cache-clang.outputs.cache-hit != 'true' | ||
run: sudo apt-fast -y install clang-5.0 | ||
|
||
if: steps.cache-clang-format.outputs.cache-hit != 'true' | ||
run: sudo apt-fast -y install clang-format-5.0 | ||
|
||
if: steps.cache-libc6-i386.outputs.cache-hit != 'true' | ||
run: sudo apt-fast -y install libc6-i386 | ||
|
||
# for vcan module | ||
if: steps.cache-linux-module.outputs.cache-hit != 'true' | ||
run: sudo apt-fast -y install linux-modules-extra-$(uname -r) | ||
|
||
run: | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm fairly certain you can only have one |
||
ln -sf `which gcc-6` ~/.local/bin/gcc | ||
ln -sf `which clang-5.0` ~/.local/bin/clang | ||
ln -sf `which clang-format-5.0` ~/.local/bin/clang-format | ||
|
@@ -51,6 +103,7 @@ jobs: | |
MAKE_PATH: make-4.1 | ||
MAKE_ARCHIVE_PATH: make-4.1.tar.gz | ||
MAKE_URL: http://ftp.gnu.org/gnu/make/make-4.1.tar.gz | ||
if: steps.cache-make.outputs.cache-hit != 'true' | ||
run: | | ||
wget -nv $MAKE_URL | ||
tar xvf $MAKE_ARCHIVE_PATH | ||
|
@@ -66,6 +119,7 @@ jobs: | |
python-version: '3.x' | ||
|
||
- name: Install Python tooling | ||
if: steps.cache-pip.outputs.cache-hit != 'true' | ||
run: | | ||
pip install --user pylint | ||
pip install --user autopep8 | ||
|
@@ -90,17 +144,33 @@ jobs: | |
pylint --version | ||
autopep8 --version | ||
|
||
- name: Format and lint | ||
- name: Format | ||
run: | | ||
make test_format | ||
|
||
- name: Lint | ||
make lint | ||
|
||
- name: Pylint | ||
make pylint | ||
|
||
- name: Build and test | ||
- name: Build stm32f0xx | ||
run: | | ||
make build_all PLATFORM=stm32f0xx DEFINES="${DEFINES}" | ||
make clean | ||
|
||
- name: Build x86 | ||
run: | | ||
make build_all PLATFORM=x86 DEFINE="${DEFINES}" | ||
|
||
- name: Test x86 | ||
run: | | ||
make test_all PLATFORM=x86 DEFINE="${DEFINES}" | ||
|
||
- name: Pytest | ||
run: | | ||
make pytest_all | ||
|
||
- name: Build x86 with clang | ||
run: | | ||
make build_all PLATFORM=x86 COMPILER=clang DEFINE="${DEFINES}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing this script does in
~/.local/bin
is set up some links that take a negligible amount of time to set up. I don't think you need to cache~/.local/bin/gcc
- figure out where GCC is actually installed to and use that directory instead.