Skip to content

Commit fe2135d

Browse files
authored
Use GitHub Actions for unit testing on Arm arch. (#238)
The test runs on a docker container with QEMU. This also updates TagBot.yml.
1 parent 1e14ce6 commit fe2135d

File tree

5 files changed

+76
-22
lines changed

5 files changed

+76
-22
lines changed

.github/workflows/TagBot.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: TagBot
22
on:
3-
schedule:
4-
- cron: 0 * * * *
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
57
jobs:
68
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
710
runs-on: ubuntu-latest
811
steps:
912
- uses: JuliaRegistries/TagBot@v1

.github/workflows/UnitTest.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
env:
3939
cache-name: cache-artifacts
4040
with:
41-
path: ~/.julia/artifacts
41+
path: ~/.julia/artifacts
4242
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
4343
restore-keys: |
4444
${{ runner.os }}-test-${{ env.cache-name }}-
@@ -51,5 +51,3 @@ jobs:
5151
- uses: codecov/codecov-action@v1
5252
with:
5353
file: lcov.info
54-
55-

.github/workflows/UnitTestArm.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Unit test for Arm
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
workflow_dispatch:
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
julia-version: ['1.0', '1', 'nightly']
16+
os: [ubuntu-20.04]
17+
distro: [ubuntu20.04]
18+
arch: [aarch64]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Download Julia Binary
24+
run: >
25+
julia -e '
26+
using Pkg; Pkg.add("JSON"); using JSON;
27+
if "${{ matrix.julia-version }}" == "nightly";
28+
url = "https://julialangnightlies-s3.julialang.org/bin/linux/${{ matrix.arch }}/julia-latest-linux${{ matrix.arch }}.tar.gz";
29+
else;
30+
path = download("https://julialang-s3.julialang.org/bin/versions.json");
31+
json = JSON.parsefile(path);
32+
rm(path);
33+
a(f) = f["arch"] == "${{ matrix.arch }}" && f["os"] == "linux" && !occursin("musl", f["triplet"]);
34+
m = filter(json) do v; VersionNumber(v[1]) in Pkg.Types.VersionSpec("${{ matrix.julia-version }}") && any(a, v[2]["files"]); end;
35+
v = sort(VersionNumber.(keys(m)))[end];
36+
url = filter(a, json[string(v)]["files"])[1]["url"];
37+
end;
38+
download(url, "/tmp/julia-aarch64.tar.gz");'
39+
40+
- name: Extract Julia Files
41+
run: |
42+
cd /tmp
43+
tar -xzf julia-aarch64.tar.gz -C /home/runner/work/
44+
mv /home/runner/work/julia-*/ /home/runner/work/julia/
45+
rm julia-aarch64.tar.gz
46+
47+
- uses: uraimo/[email protected]
48+
name: Unit Test
49+
with:
50+
arch: ${{ matrix.arch }}
51+
distro: ${{ matrix.distro }}
52+
dockerRunArgs: |
53+
-v "/home/runner/work/julia:/home/runner/work/julia"
54+
-v "/home/runner/.julia/registries/General:/root/.julia/registries/General"
55+
--net=host
56+
install: |
57+
ln -s /home/runner/work/julia/bin/julia /usr/local/bin/julia
58+
echo /home/runner/work/julia/lib > /etc/ld.so.conf.d/julia.conf
59+
mkdir -p /root/.julia/registries/General
60+
run: |
61+
julia -e 'using InteractiveUtils; versioninfo();'
62+
julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)'
63+
- uses: julia-actions/julia-processcoverage@v1
64+
- uses: codecov/codecov-action@v1
65+
with:
66+
file: lcov.info

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

test/runtests.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ else
66
@test isempty(detect_ambiguities(FixedPointNumbers, Base, Core))
77
end
88

9-
using Documenter
10-
doctest(FixedPointNumbers, manual = false)
9+
if Sys.ARCH === :x86_64 || Sys.ARCH === :i686
10+
using Documenter
11+
doctest(FixedPointNumbers, manual = false)
12+
end
1113

1214
@testset "normed" begin
1315
include("normed.jl")

0 commit comments

Comments
 (0)