Skip to content

Commit

Permalink
Merge pull request #194 from TotallyNotChase/ci-fixes
Browse files Browse the repository at this point in the history
Fix coverage CI
  • Loading branch information
fennecdjay committed Oct 5, 2020
2 parents 498b9c2 + 7803344 commit 99eab3c
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 42 deletions.
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
uses: actions/checkout@v2

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

- 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)
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
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

0 comments on commit 99eab3c

Please sign in to comment.