Skip to content

Commit

Permalink
Use GitHub Actions to run CI (#825)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
tkf committed Sep 23, 2020
1 parent 46b15d7 commit fbd0bba
Show file tree
Hide file tree
Showing 5 changed files with 181 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/aot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: AOT test

on:
push:
branches:
- master
tags: '*'
pull_request:
workflow_dispatch:

jobs:
test-aot:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
architecture: [x64]
python-version: ['3.8']
julia-version: ['1.5', 'nightly']
fail-fast: false
env:
PYTHON: python${{ matrix.python-version }}
name: Test AOT
Julia ${{ matrix.julia-version }}
Python ${{ matrix.python-version }}
${{ matrix.os }} ${{ matrix.architecture }}
steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- run: python --version
- name: Setup julia
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.architecture }}
show-versioninfo: true

# Revert to `@v1` after this PR is merged:
# https://github.com/JuliaLang/PackageCompiler.jl/pull/443
- run: julia -e 'using Pkg; pkg"add PackageCompiler#cb994c72e2087c57ffa4727ef93589e1b98d8a32"'

# Workaround https://github.com/JuliaLang/julia/issues/37441.
# Once it's solved, we can remove the following line:
- run: julia -e 'using Pkg; pkg"dev PyCall"'

- run: aot/compile.jl
- run: aot/assert_has_pycall.jl
- run: aot/runtests.sh
48 changes: 48 additions & 0 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test with conda

on:
push:
branches:
- master
tags: '*'
pull_request:
workflow_dispatch:

jobs:
test-conda:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
architecture: [x64]
julia-version: ['1.5']
include:
- os: windows-latest
architecture: x86
julia-version: '1.5'
fail-fast: false
env:
PYTHON: ""
name: Test
Julia ${{ matrix.julia-version }}
Conda
${{ matrix.os }} ${{ matrix.architecture }}
steps:
- uses: actions/checkout@v1
- name: Setup julia
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.architecture }}
show-versioninfo: true
- 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
flags: unittests
name: codecov-umbrella
68 changes: 68 additions & 0 deletions .github/workflows/system.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Test with system Python

on:
push:
branches:
- master
tags: '*'
pull_request:
workflow_dispatch:

jobs:
test-system:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
architecture: [x64]
python-version: ['2.7', '3.8']
julia-version: ['1.0', '1.5', 'nightly']
include:
- os: windows-latest
architecture: x86
python-version: '3.8'
julia-version: '1.5'
- os: ubuntu-latest
architecture: x64
python-version: '3.7'
julia-version: '1.5'
- os: ubuntu-latest
architecture: x64
python-version: '3.8'
julia-version: '1.4'
- os: ubuntu-latest
architecture: x64
python-version: '3.8'
julia-version: '1.3'
fail-fast: false
name: Test
Julia ${{ matrix.julia-version }}
Python ${{ matrix.python-version }}
${{ matrix.os }} ${{ matrix.architecture }}
steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Setup julia
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.architecture }}
show-versioninfo: true
- uses: julia-actions/julia-buildpkg@v1
env:
PYTHON: python
- run: julia test/check_deps_version.jl ${{ matrix.python-version }}
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: ./lcov.info
flags: unittests
name: codecov-umbrella
10 changes: 10 additions & 0 deletions test/check_deps_version.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Test
const desired_version = VersionNumber(ARGS[1])
include("../deps/deps.jl")
@testset "pyversion_build ≈ $desired_version" begin
@test desired_version.major == pyversion_build.major
@test desired_version.minor == pyversion_build.minor
if desired_version.patch != 0
@test desired_version.patch == pyversion_build.patch
end
end
2 changes: 2 additions & 0 deletions test/test_build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ using Test

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

0 comments on commit fbd0bba

Please sign in to comment.