55 branches :
66 - " **"
77 pull_request :
8- types : [opened]
8+ types : [ready_for_review, synchronize, opened] # fix: synchronize triggers builds for PR merges with the base branch, currently causes duplicate builds as synchronize is treated the same as push for everything besides merges
99
1010jobs :
11- arduino-default :
11+ arduino :
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 Dependencies
19+ run : ./.github/workflows/test/install_arduino.sh
20+ - name : Build Arduino Sketch
21+ run : ./.github/workflows/test/script_arduino.sh
2222
23- linux-default :
23+ platformio :
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 : Install Dependencies
29+ run : |
30+ sudo pip install -U platformio
31+ platformio update
32+ - name : Build
33+ run : |
34+ platformio run
35+ platformio run -d ./test
3836
3937 linux-gcc7 :
4038 runs-on : ubuntu-latest
4139
4240 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 }}
41+ - uses : actions/checkout@v1
42+ - name : Install Dependencies
43+ run : |
44+ sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
45+ sudo apt-get update
46+ sudo apt-get -y install g++-7 gcc-7 lcov
47+ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
48+ sudo update-alternatives --config gcc
49+ - name : Build
50+ run : |
51+ mkdir build && cd build
52+ cmake -DCMAKE_BUILD_TYPE=Coverage -DUNIT_TEST=ON ..
53+ cmake --build .
54+ - name : Run Tests
55+ run : ./build/test/ark_cpp_crypto_tests
56+ - name : Codecov upload
57+ run : bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
5758
5859 linux-clang-5 :
5960 runs-on : ubuntu-latest
6061
6162 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
63+ - uses : actions/checkout@v1
64+ - name : Install Dependencies
65+ run : |
66+ sudo apt-get update
67+ sudo apt install liblldb-5.0-dev python-lldb-5.0 lcov
68+ 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
69+ sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-5.0 60
70+ sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 50
71+ sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-5.0 60
72+ sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 50
73+ - name : Make scripts executable
74+ run : sudo chmod -R +x ./.github/workflows/test/*.sh
75+ - name : Build
76+ run : |
77+ mkdir build && cd build
78+ cmake -DUNIT_TEST=ON ..
79+ cmake --build .
80+ - name : Run Tests
81+ run : ./build/test/ark_cpp_crypto_tests
82+ - name : Clang Tidy
83+ run : ./.github/workflows/test/clang_tidy.sh
84+ - name : Clang Format
85+ run : ./.github/workflows/test/clang_format.sh
8086
8187 macOS :
8288 runs-on : macOS-latest
8389
8490 steps :
8591 - uses : actions/checkout@v1
8692 - run : COMPILER=clang++
87- - name : Install dependencies
88- run : brew install cmake lcov
89- - name : Make scripts executable
90- run : sudo chmod -R +x ./.github/workflows/test/*.sh
93+ - name : Install Dependencies
94+ run : brew install cmake
9195 - name : Build
92- run : ./.github/workflows/test/script_desktop.sh
96+ run : |
97+ mkdir build && cd build
98+ cmake -DUNIT_TEST=ON ..
99+ cmake --build .
100+ - name : Run Tests
101+ run : ./build/test/ark_cpp_crypto_tests
102+
103+ windows :
104+ runs-on : windows-2016
105+ strategy :
106+ matrix :
107+ build : [Debug, Release]
108+
109+ steps :
110+ - uses : actions/checkout@v1
111+ - name : Setup MSBuild.exe
112+ uses : warrenbuckley/Setup-MSBuild@v1
113+ - name : CMake
114+ run : cmake -D UNIT_TEST=ON -G "Visual Studio 15 2017 Win64" .
115+ - name : Build Solution
116+ shell : cmd
117+ run : msbuild "%GITHUB_WORKSPACE%\ark_cpp_crypto.sln"
118+ - name : Run Tests
119+ run : call "%GITHUB_WORKSPACE%\test\Debug\ark_cpp_crypto_tests"
0 commit comments