Skip to content
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

Fix coverage CI #194

Merged
merged 14 commits into from Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 17 additions & 24 deletions .github/workflows/coverage.yml
Expand Up @@ -18,14 +18,19 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"

steps:
- name: Checkout
Copy link
Member

@fennecdjay fennecdjay Oct 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the thing asked for in the issue, you uncovered so many things beyond that!
Thank you.

uses: actions/checkout@v2

- name: Init submodules
run: git submodule update --init util ast
Comment on lines +24 to +25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submodules on their own place is nice.


- name: Build Gwion
uses: fennecdjay/gwion-action@v1
with:
dir: .
ref: ${{ github.sha }}
run: 'true'
run: make
env:
USE_COVERAGE: 1

- name: Test Gwion
run: make test

- uses: actions/setup-python@v1
with:
Expand All @@ -51,7 +56,13 @@ jobs:
COV_NUM=${COV_TXT: : -1}
echo $COV_NUM > gwion-coverage-report/coverage_num.txt
sed -i 's/<html>/<script type="text\/javascript" src="..\/focus.js"><\/script><html>/' index.src_*.html
branch=$(basename ${{ github.event.ref }})
if [ "${{ github.event_name }}" == "push" ]
then
ref="${{ github.ref }}"
else
ref="${{ github.event.head.ref }}"
fi
branch=$(basename ref)
Comment on lines +59 to +65
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty useful snippet here.

cd gwion-coverage-report/
bash old.sh $branch
bash summary.sh
Expand Down Expand Up @@ -91,21 +102,3 @@ jobs:
git add .
git commit -m "Update html report"
git push origin HEAD:gh-pages
# git push origin --set-upstream origin gh-pages
# git add -f html
# git commit -m "Update html report"
# git subtree push --prefix html origin gh-pages


- name: Send mail
uses: dawidd6/action-send-mail@master
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: Github Actions job result
body: file://diff.html
to: ${{ github.event.repository.owner.email }},${{ github.event.pusher.email }}
from: Gwion Coverage action
content_type: text/html
TotallyNotChase marked this conversation as resolved.
Show resolved Hide resolved
22 changes: 16 additions & 6 deletions .github/workflows/linux.yml
Expand Up @@ -2,7 +2,11 @@ name: Linux

on:
push:
branches:
branches:
- '**'
- '!gh-pages'
pull_request:
branches:
- '**'
- '!gh-pages'

Expand All @@ -17,12 +21,18 @@ jobs:
double: [0, 1]

steps:
- name: Build Gwion
uses: fennecdjay/gwion-action@v1
with:
ref: ${{ github.sha }}
run: true
- name: Checkout
uses: actions/checkout@v2

- name: Init submodules
run: git submodule update --init util ast

- name: Build
run: make
env:
CC: ${{ matrix.cc }}
USE_DOUBLE: ${{ matrix.double }}
USE_DEBUG: 1

- name: Test
run: make test
22 changes: 16 additions & 6 deletions .github/workflows/macos.yml
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- '**'
- '!gh-pages'
pull_request:
branches:
- '**'
- '!gh-pages'

jobs:
build:
Expand All @@ -17,12 +21,18 @@ jobs:
double: [0, 1]

steps:
- name: Build Gwion
uses: fennecdjay/gwion-action@v1
with:
ref: ${{ github.sha }}
run: true
- name: Checkout
uses: actions/checkout@v2

- name: Init submodules
run: git submodule update --init util ast

- name: Build
run: make
env:
CC: ${{ matrix.cc }}
USE_DOUBLE: ${{ matrix.double }}
USE_DEBUG: 1
USE_DOUBLE: 1

- name: Test
run: make test
23 changes: 17 additions & 6 deletions .github/workflows/windows.yml
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- '**'
- '!gh-pages'
pull_request:
branches:
- '**'
- '!gh-pages'

jobs:
build:
Expand All @@ -16,13 +20,20 @@ jobs:
double: [0, 1]

steps:
- name: Build Gwion
uses: fennecdjay/gwion-action@v1
with:
dir: .
ref: ${{ github.sha }}
run: true
- name: Checkout
uses: actions/checkout@v2

- name: Init submodules
run: git submodule update --init util ast

- name: Build
run: make
env:
CC: gcc
USE_DOUBLE: ${{ matrix.double }}
BUILD_ON_WINDOWS: 1

- name: Test
run: make test
env:
BUILD_ON_WINDOWS: 1