Skip to content

Commit

Permalink
Merge pull request #206 from JuliaReach/schillic/ci
Browse files Browse the repository at this point in the history
Update scripts
  • Loading branch information
schillic authored Jul 19, 2022
2 parents 409769d + ff57b6a commit 399a752
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 30 deletions.
28 changes: 9 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,21 @@ on:
- 'README.md'
branches:
- master
pull_request:
branches:
- master
tags: '*'

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
fail-fast: false
matrix:
julia-version: ['1.7']
julia-arch: [x64]
os: [ubuntu-latest, windows-latest]
include:
- julia-version: '1.0' # test on oldest supported version
julia-arch: x64
os: ubuntu-latest
# - julia-version: 'nightly' # test on latest version
# julia-arch: x64
# os: ubuntu-latest
# experimental: true
version:
- '1.7'
os:
- ubuntu-latest
arch:
- x64
env:
JULIA_PKG_SERVER: ''
steps:
Expand All @@ -38,16 +30,14 @@ jobs:
- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Cache artifacts
uses: julia-actions/cache@v1
- name: Build package
uses: julia-actions/julia-buildpkg@v1
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
- name: Run tests
uses: julia-actions/julia-runtest@v1
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
- name: Process coverage
uses: julia-actions/julia-processcoverage@v1
- name: Upload coverage
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/ci_PR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI-PR

on:
pull_request:
paths-ignore:
- 'LICENSE'
- 'README.md'

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
fail-fast: false
matrix:
version:
- '1.7'
os:
- ubuntu-latest
- windows-latest
arch:
- x64
include:
- version: '1.0' # test on oldest supported version
arch: x64
os: ubuntu-latest
env:
JULIA_PKG_SERVER: ''
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Cache artifacts
uses: julia-actions/cache@v1
- name: Build package
uses: julia-actions/julia-buildpkg@v1
- name: Run tests
uses: julia-actions/julia-runtest@v1
- name: Process coverage
uses: julia-actions/julia-processcoverage@v1
- name: Upload coverage
uses: codecov/codecov-action@v2
with:
files: lcov.info
20 changes: 9 additions & 11 deletions .github/workflows/clean-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@ jobs:
uses: actions/checkout@v2
with:
ref: gh-pages

- name: Delete preview and history
- name: Delete preview and history + push changes
run: |
git config user.name "Documenter.jl"
git config user.email "[email protected]"
git rm -rf "previews/PR$PRNUM"
git commit -m "delete preview"
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
if [ -d "previews/PR$PRNUM" ]; then
git config user.name "Documenter.jl"
git config user.email "[email protected]"
git rm -rf "previews/PR$PRNUM"
git commit -m "delete preview"
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
git push --force origin gh-pages-new:gh-pages
fi
env:
PRNUM: ${{ github.event.number }}

- name: Push changes
run: |
git push --force origin gh-pages-new:gh-pages

0 comments on commit 399a752

Please sign in to comment.