Skip to content

Commit acccb7a

Browse files
authored
ci: pass environment variables to steps (#152)
1 parent 4c5bad2 commit acccb7a

1 file changed

Lines changed: 62 additions & 50 deletions

File tree

.github/workflows/test.yml

Lines changed: 62 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,71 +12,83 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v1
16-
- name: Make scripts executable
17-
run: sudo chmod -R +x ./.github/workflows/test/*.sh
18-
- name: Install
19-
run: ./.github/workflows/test/install_arduino.sh
20-
- name: Build
21-
run: ./.github/workflows/test/script_arduino.sh
15+
- uses: actions/checkout@v1
16+
- name: Make scripts executable
17+
run: sudo chmod -R +x ./.github/workflows/test/*.sh
18+
- name: Install
19+
run: ./.github/workflows/test/install_arduino.sh
20+
- name: Build
21+
run: ./.github/workflows/test/script_arduino.sh
2222

2323
linux-default:
2424
runs-on: ubuntu-latest
2525

2626
steps:
27-
- uses: actions/checkout@v1
28-
- name: Make scripts executable
29-
run: sudo chmod -R +x ./.github/workflows/test/*.sh
30-
- name: Install
31-
run: ./.github/workflows/test/install_platform_io.sh
32-
- name: Empty Git Submodule Folders
33-
run: |
34-
rm -rf ./src/lib/{ArduinoJson/*,BIP66/*,uECC/*}
35-
rm -rf ./test/lib/googletest/*
36-
- name: Build
37-
run: ./.github/workflows/test/script_platform_io.sh
27+
- uses: actions/checkout@v1
28+
- name: Make scripts executable
29+
run: sudo chmod -R +x ./.github/workflows/test/*.sh
30+
- name: Install
31+
run: ./.github/workflows/test/install_platform_io.sh
32+
- name: Empty Git Submodule Folders
33+
run: |
34+
rm -rf ./src/lib/{ArduinoJson/*,BIP66/*,uECC/*}
35+
rm -rf ./test/lib/googletest/*
36+
- name: Build
37+
run: ./.github/workflows/test/script_platform_io.sh
3838

3939
linux-gcc7:
4040
runs-on: ubuntu-latest
4141

4242
steps:
43-
- uses: actions/checkout@v1
44-
- name: Install dependencies
45-
run: |
46-
sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
47-
sudo apt-get update
48-
sudo apt-get -y install g++-7 gcc-7 lcov
49-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
50-
sudo update-alternatives --config gcc
51-
- name: Make scripts executable
52-
run: sudo chmod -R +x ./.github/workflows/test/*.sh
53-
- name: Build
54-
run: ./.github/workflows/test/script_desktop.sh
55-
- name: Codecov upload
56-
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
43+
- uses: actions/checkout@v1
44+
- name: Install dependencies
45+
run: |
46+
sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
47+
sudo apt-get update
48+
sudo apt-get -y install g++-7 gcc-7 lcov
49+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
50+
sudo update-alternatives --config gcc
51+
- name: Make scripts executable
52+
run: sudo chmod -R +x ./.github/workflows/test/*.sh
53+
- name: Build
54+
run: ./.github/workflows/test/script_desktop.sh
55+
env:
56+
CC: gcc-7
57+
CXX: g++-7
58+
- name: Codecov upload
59+
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
5760

5861
linux-clang-5:
5962
runs-on: ubuntu-latest
6063

6164
steps:
62-
- uses: actions/checkout@v1
63-
- name: Install dependencies
64-
run: |
65-
sudo apt-get update
66-
sudo apt install liblldb-5.0-dev python-lldb-5.0 lcov
67-
sudo apt install clang-5.0 clang-tidy-5.0 clang-format-5.0 clang-5.0-doc libclang-common-5.0-dev libclang-5.0-dev libclang1-5.0 libllvm5.0 lldb-5.0 llvm-5.0 llvm-5.0-dev
68-
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-5.0 60
69-
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 50
70-
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-5.0 60
71-
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 50
72-
- name: Make scripts executable
73-
run: sudo chmod -R +x ./.github/workflows/test/*.sh
74-
- name: Build
75-
run: ./.github/workflows/test/script_desktop.sh
76-
- name: Clang Tidy
77-
run: ./.github/workflows/test/clang_tidy.sh
78-
- name: Clang Format
79-
run: ./.github/workflows/test/clang_format.sh
65+
- uses: actions/checkout@v1
66+
- name: Install dependencies
67+
run: |
68+
sudo apt-get update
69+
sudo apt install liblldb-5.0-dev python-lldb-5.0 lcov
70+
sudo apt install clang-5.0 clang-tidy-5.0 clang-format-5.0 clang-5.0-doc libclang-common-5.0-dev libclang-5.0-dev libclang1-5.0 libllvm5.0 lldb-5.0 llvm-5.0 llvm-5.0-dev
71+
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-5.0 60
72+
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 50
73+
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-5.0 60
74+
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 50
75+
- name: Make scripts executable
76+
run: sudo chmod -R +x ./.github/workflows/test/*.sh
77+
- name: Build
78+
run: ./.github/workflows/test/script_desktop.sh
79+
env:
80+
CC: clang-5.0
81+
CXX: clang++-5.0
82+
- name: Clang Tidy
83+
run: ./.github/workflows/test/clang_tidy.sh
84+
env:
85+
CC: clang-5.0
86+
CXX: clang++-5.0
87+
- name: Clang Format
88+
run: ./.github/workflows/test/clang_format.sh
89+
env:
90+
CC: clang-5.0
91+
CXX: clang++-5.0
8092

8193
macOS:
8294
runs-on: macOS-latest

0 commit comments

Comments
 (0)