Skip to content

Commit

Permalink
Add CI_M1.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dpo authored Aug 31, 2022
1 parent 0604212 commit dfdca68
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/CI_M1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI_M1
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
name: Julia ${{ matrix.version }} - macOS - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
version:
- '1'
arch:
- aarch64
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Version Info
shell: julia --color=yes {0}
run: |
using InteractiveUtils
versioninfo()
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
12 changes: 8 additions & 4 deletions test/test_usymqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
r = b - A * x
resid = norm(r) / norm(b)
@test(resid usymqr_tol)
@test(stats.solved)

# Test b == 0
A, b = zero_rhs(FC=FC)
Expand Down Expand Up @@ -109,9 +108,14 @@

# Poisson equation in polar coordinates.
A, b = polar_poisson(FC=FC)
(x, stats) = usymqr(A, b, b)
r = b - A * x
resid = norm(r) / norm(b)
n = length(b)
d = [A[i,i] 0 ? 1 / abs(A[i,i]) : 1 for i=1:n]
P⁻¹ = diagm(d)
= P⁻¹ * A
= P⁻¹ * b
(x, stats) = usymqr(Ā, b̄, b̄)
= P⁻¹ * (b - A * x)
resid = norm(r̄) / norm(b̄)
@test(resid usymqr_tol)
@test(stats.solved)

Expand Down

0 comments on commit dfdca68

Please sign in to comment.