Unit tests on mac with clang (#2179)

* os matrix

* try macos latest

* s

* mac doesn't do that

* comment

* does it even need this?

* nope, it doesn't
This commit is contained in:
Matthew Kennedy 2021-01-04 19:10:51 -08:00 committed by GitHub
parent 8c7ab1cbe3
commit 2501a04305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 8 deletions

View File

@ -4,8 +4,12 @@ on: [push,pull_request]
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/checkout@v1
with:
@ -13,6 +17,7 @@ jobs:
fetch-depth: 0
- name: Discover cores
if: ${{ matrix.os != 'macos-latest' }}
run: lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)'
- name: Generate Configs
@ -23,10 +28,8 @@ jobs:
working-directory: ./firmware/
run: bash gen_live_documentation.sh
- name: Install gcc8
run: sudo apt-get install -y gcc-8
- name: Print GCC version
- name: Print Compiler version
# NOTE: on mac, this is actually symlink'd to clang, not gcc, but that's ok - we want to build on both
working-directory: .
run: gcc -v
@ -38,15 +41,17 @@ jobs:
run: ./unit_tests/build/rusefi_test
- name: Install Coverage Tools
if: ${{ matrix.os != 'macos-latest' }}
run: sudo apt-get install ncftp lcov
- name: Generate Code Coverage
if: ${{ matrix.os != 'macos-latest' }}
working-directory: ./unit_tests/
run: ./ci_gcov.sh ${{ secrets.RUSEFI_DOXYGEN_FTP_USER }} ${{ secrets.RUSEFI_DOXYGEN_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}
# Commit changes and catch the error that occurs if nothing has been changed (without catching other errors)
- name: Commit fresh triggers.txt
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.os != 'macos-latest' }}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
#
@ -73,7 +78,7 @@ jobs:
fi
- name: Push configs
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master' && env.NOCOMMIT != 'true'}}
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master' && env.NOCOMMIT != 'true' && matrix.os != 'macos-latest'}}
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}