Skip to content

Use GitHub Actions for unit testing on Arm arch. #238

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

Merged
merged 2 commits into from
Dec 19, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: TagBot
on:
schedule:
- cron: 0 * * * *
issue_comment:
types:
- created
workflow_dispatch:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/UnitTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
Expand All @@ -51,5 +51,3 @@ jobs:
- uses: codecov/codecov-action@v1
with:
file: lcov.info


66 changes: 66 additions & 0 deletions .github/workflows/UnitTestArm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Unit test for Arm

on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
julia-version: ['1.0', '1', 'nightly']
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe just 1 to save CI build time? I'm not sure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since those tests are run in parallel, I do not think reducing the targets will have much of an effect on speeding up the total process.

os: [ubuntu-20.04]
distro: [ubuntu20.04]
arch: [aarch64]

steps:
- uses: actions/checkout@v2

- name: Download Julia Binary
run: >
julia -e '
using Pkg; Pkg.add("JSON"); using JSON;
if "${{ matrix.julia-version }}" == "nightly";
url = "https://julialangnightlies-s3.julialang.org/bin/linux/${{ matrix.arch }}/julia-latest-linux${{ matrix.arch }}.tar.gz";
else;
path = download("https://julialang-s3.julialang.org/bin/versions.json");
json = JSON.parsefile(path);
rm(path);
a(f) = f["arch"] == "${{ matrix.arch }}" && f["os"] == "linux" && !occursin("musl", f["triplet"]);
m = filter(json) do v; VersionNumber(v[1]) in Pkg.Types.VersionSpec("${{ matrix.julia-version }}") && any(a, v[2]["files"]); end;
v = sort(VersionNumber.(keys(m)))[end];
url = filter(a, json[string(v)]["files"])[1]["url"];
end;
download(url, "/tmp/julia-aarch64.tar.gz");'

- name: Extract Julia Files
run: |
cd /tmp
tar -xzf julia-aarch64.tar.gz -C /home/runner/work/
mv /home/runner/work/julia-*/ /home/runner/work/julia/
rm julia-aarch64.tar.gz

- uses: uraimo/[email protected]
name: Unit Test
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
dockerRunArgs: |
-v "/home/runner/work/julia:/home/runner/work/julia"
-v "/home/runner/.julia/registries/General:/root/.julia/registries/General"
--net=host
install: |
ln -s /home/runner/work/julia/bin/julia /usr/local/bin/julia
echo /home/runner/work/julia/lib > /etc/ld.so.conf.d/julia.conf
mkdir -p /root/.julia/registries/General
run: |
julia -e 'using InteractiveUtils; versioninfo();'
julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)'
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

6 changes: 4 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ else
@test isempty(detect_ambiguities(FixedPointNumbers, Base, Core))
end

using Documenter
doctest(FixedPointNumbers, manual = false)
if Sys.ARCH === :x86_64 || Sys.ARCH === :i686
using Documenter
doctest(FixedPointNumbers, manual = false)
end

@testset "normed" begin
include("normed.jl")
Expand Down