Skip to content

Commit fbd0bba

Browse files
authored
Use GitHub Actions to run CI (#825)
* Use GitHub Actions to run CI * Workaround word size problem in test_build.jl * Run CI with conda * Run AOT test with GitHub Actions * Workaround artifact"" macro failure in Julia 1.6-DEV * (trigger) * Show versioninfo * Use show-versioninfo option for setup-julia
1 parent 46b15d7 commit fbd0bba

File tree

5 files changed

+181
-0
lines changed

5 files changed

+181
-0
lines changed

.github/workflows/aot.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: AOT test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
test-aot:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os:
17+
- ubuntu-latest
18+
architecture: [x64]
19+
python-version: ['3.8']
20+
julia-version: ['1.5', 'nightly']
21+
fail-fast: false
22+
env:
23+
PYTHON: python${{ matrix.python-version }}
24+
name: Test AOT
25+
Julia ${{ matrix.julia-version }}
26+
Python ${{ matrix.python-version }}
27+
${{ matrix.os }} ${{ matrix.architecture }}
28+
steps:
29+
- uses: actions/checkout@v1
30+
- name: Setup python
31+
uses: actions/setup-python@v1
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
architecture: ${{ matrix.architecture }}
35+
- run: python --version
36+
- name: Setup julia
37+
uses: julia-actions/setup-julia@v1
38+
with:
39+
version: ${{ matrix.julia-version }}
40+
arch: ${{ matrix.architecture }}
41+
show-versioninfo: true
42+
43+
# Revert to `@v1` after this PR is merged:
44+
# https://github.com/JuliaLang/PackageCompiler.jl/pull/443
45+
- run: julia -e 'using Pkg; pkg"add PackageCompiler#cb994c72e2087c57ffa4727ef93589e1b98d8a32"'
46+
47+
# Workaround https://github.com/JuliaLang/julia/issues/37441.
48+
# Once it's solved, we can remove the following line:
49+
- run: julia -e 'using Pkg; pkg"dev PyCall"'
50+
51+
- run: aot/compile.jl
52+
- run: aot/assert_has_pycall.jl
53+
- run: aot/runtests.sh

.github/workflows/conda.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Test with conda
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
test-conda:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os:
17+
- ubuntu-latest
18+
- macos-latest
19+
- windows-latest
20+
architecture: [x64]
21+
julia-version: ['1.5']
22+
include:
23+
- os: windows-latest
24+
architecture: x86
25+
julia-version: '1.5'
26+
fail-fast: false
27+
env:
28+
PYTHON: ""
29+
name: Test
30+
Julia ${{ matrix.julia-version }}
31+
Conda
32+
${{ matrix.os }} ${{ matrix.architecture }}
33+
steps:
34+
- uses: actions/checkout@v1
35+
- name: Setup julia
36+
uses: julia-actions/setup-julia@v1
37+
with:
38+
version: ${{ matrix.julia-version }}
39+
arch: ${{ matrix.architecture }}
40+
show-versioninfo: true
41+
- uses: julia-actions/julia-buildpkg@v1
42+
- uses: julia-actions/julia-runtest@v1
43+
- uses: julia-actions/julia-processcoverage@v1
44+
- uses: codecov/codecov-action@v1
45+
with:
46+
file: ./lcov.info
47+
flags: unittests
48+
name: codecov-umbrella

.github/workflows/system.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Test with system Python
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
test-system:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os:
17+
- ubuntu-latest
18+
- macos-latest
19+
- windows-latest
20+
architecture: [x64]
21+
python-version: ['2.7', '3.8']
22+
julia-version: ['1.0', '1.5', 'nightly']
23+
include:
24+
- os: windows-latest
25+
architecture: x86
26+
python-version: '3.8'
27+
julia-version: '1.5'
28+
- os: ubuntu-latest
29+
architecture: x64
30+
python-version: '3.7'
31+
julia-version: '1.5'
32+
- os: ubuntu-latest
33+
architecture: x64
34+
python-version: '3.8'
35+
julia-version: '1.4'
36+
- os: ubuntu-latest
37+
architecture: x64
38+
python-version: '3.8'
39+
julia-version: '1.3'
40+
fail-fast: false
41+
name: Test
42+
Julia ${{ matrix.julia-version }}
43+
Python ${{ matrix.python-version }}
44+
${{ matrix.os }} ${{ matrix.architecture }}
45+
steps:
46+
- uses: actions/checkout@v1
47+
- name: Setup python
48+
uses: actions/setup-python@v1
49+
with:
50+
python-version: ${{ matrix.python-version }}
51+
architecture: ${{ matrix.architecture }}
52+
- name: Setup julia
53+
uses: julia-actions/setup-julia@v1
54+
with:
55+
version: ${{ matrix.julia-version }}
56+
arch: ${{ matrix.architecture }}
57+
show-versioninfo: true
58+
- uses: julia-actions/julia-buildpkg@v1
59+
env:
60+
PYTHON: python
61+
- run: julia test/check_deps_version.jl ${{ matrix.python-version }}
62+
- uses: julia-actions/julia-runtest@v1
63+
- uses: julia-actions/julia-processcoverage@v1
64+
- uses: codecov/codecov-action@v1
65+
with:
66+
file: ./lcov.info
67+
flags: unittests
68+
name: codecov-umbrella

test/check_deps_version.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Test
2+
const desired_version = VersionNumber(ARGS[1])
3+
include("../deps/deps.jl")
4+
@testset "pyversion_build ≈ $desired_version" begin
5+
@test desired_version.major == pyversion_build.major
6+
@test desired_version.minor == pyversion_build.minor
7+
if desired_version.patch != 0
8+
@test desired_version.patch == pyversion_build.patch
9+
end
10+
end

test/test_build.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ using Test
77

88
@testset "find_libpython" begin
99
for python in ["python", "python2", "python3"]
10+
# TODO: In Windows, word size should also be checked.
11+
Sys.iswindows() && break
1012
if Sys.which(python) === nothing
1113
@info "$python not available; skipping test"
1214
else

0 commit comments

Comments
 (0)