Skip to content

Commit

Permalink
add CI (#3)
Browse files Browse the repository at this point in the history
* add CI

* fix for Julia 1.3
  • Loading branch information
stevengj authored Jul 12, 2021
1 parent d6964d0 commit 79e3a58
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI
on:
pull_request:
push:
branches:
- main
tags: '*'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.3'
- '1.6'
# - 'nightly'
os:
- ubuntu-latest
# - macOS-latest
# - windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
11 changes: 11 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: TagBot
on:
schedule:
- cron: 0 * * * *
jobs:
TagBot:
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions src/regression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function chebregression(x::AbstractVector{SVector{N,Td}}, y::AbstractVector{T},
# assemble rhs as matrix
Y = Array{float(eltype(T))}(undef, length(y), length(first(y)))
for j = 1:length(y)
Y[j,:] .= y[j + (begin-1)]
Y[j,:] .= y[j + (firstindex(y)-1)]
end

# assemble lhs matrix
Expand All @@ -22,7 +22,7 @@ function chebregression(x::AbstractVector{SVector{N,Td}}, y::AbstractVector{T},
for i = 1:length(c.coefs)
c.coefs[i] = 1 # basis function
for j = 1:length(x)
A[j,i] = c(x[j + (begin-1)])
A[j,i] = c(x[j + (firstindex(x)-1)])
end
c.coefs[i] = 0 # reset
end
Expand Down

0 comments on commit 79e3a58

Please sign in to comment.