Matrix Build #666
This file contains 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
name: Matrix Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
schedule: | |
- cron: 0 9 * * * | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
include: | |
- os: windows-latest | |
crlf: fix | |
- os: ubuntu-latest | |
coverage: -Dtest-coverage=true | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: Force Line Endings for Windows | |
if: ${{ matrix.crlf }} | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Zig | |
uses: goto-bus-stop/setup-zig@v2 | |
with: | |
version: master | |
- name: Download kcov | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
sudo apt-get install -y kcov | |
- name: Run Tests | |
run: | | |
zig version | |
zig build test ${{ matrix.coverage }} | |
- name: Upload Codecov | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
run: | | |
curl -Os https://uploader.codecov.io/latest/linux/codecov | |
chmod +x codecov | |
./codecov -t ${CODECOV_TOKEN} |