Skip to content

Commit a3c1d24

Browse files
devmotionzsteve
andauthored
Test on Julia 1.0 and Julia LTS (#21)
* Test on Julia 1.0 and Julia LTS * Test only with conda and try some fixes * Update CI.yml * Update Project.toml * Update CI.yml * Update CI.yml * remove LD_PRELOAD * Revert "Update CI.yml" This reverts commit f15cdd4. * add back workaround * Update CI.yml * Update CI.yml * Update CI.yml * Update CI.yml * Update CI.yml Co-authored-by: stephen zhang <syz@syz.id.au>
1 parent cf375e5 commit a3c1d24

File tree

2 files changed

+40
-39
lines changed

2 files changed

+40
-39
lines changed

.github/workflows/CI.yml

+38-38
Original file line numberDiff line numberDiff line change
@@ -14,68 +14,68 @@ concurrency:
1414

1515
jobs:
1616
test:
17-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ (matrix.python && 'system Python') || 'conda' }}
17+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
1818
runs-on: ${{ matrix.os }}
19+
env:
20+
PYTHON: '' # always use Conda.jl, even on Linux where `python`/`python3` is in the PATH
1921
strategy:
2022
fail-fast: false
2123
matrix:
2224
version:
23-
- '1.8'
25+
- '1.0'
26+
- '1.6'
2427
- '1'
2528
os:
2629
- ubuntu-latest
2730
- macOS-latest
2831
- windows-latest
2932
arch:
3033
- x64
31-
python:
32-
- ''
33-
- python
34-
include:
35-
- version: '1'
36-
os: ubuntu-latest
34+
exclude:
35+
# Conda installation fails: https://github.com/JuliaPy/Conda.jl/issues/230
36+
- version: '1.0'
37+
os: windows-latest
3738
arch: x64
38-
coverage: true
3939
steps:
4040
- uses: actions/checkout@v2
41-
- name: Install python
42-
uses: actions/setup-python@v2
43-
with:
44-
python-version: '3.x'
45-
architecture: ${{ matrix.arch }}
46-
if: matrix.python
47-
- run: python -m pip install pot
48-
if: matrix.python
4941
- uses: julia-actions/setup-julia@v1
5042
with:
5143
version: ${{ matrix.version }}
5244
arch: ${{ matrix.arch }}
53-
- uses: actions/cache@v1
54-
env:
55-
cache-name: cache-artifacts
45+
- uses: julia-actions/cache@v1
5646
with:
57-
path: ~/.julia/artifacts
58-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
59-
restore-keys: |
60-
${{ runner.os }}-test-${{ env.cache-name }}-
61-
${{ runner.os }}-test-
62-
${{ runner.os }}-
47+
cache-packages: "false" # Weird interaction with PyCall settings?
6348
- uses: julia-actions/julia-buildpkg@v1
64-
env:
65-
PYTHON: ${{ matrix.python }}
49+
- name: Install POT
50+
run: |
51+
using PyCall: Conda
52+
Conda.add("nomkl") # Work around https://github.com/JuliaPy/PyPlot.jl/issues/315
53+
Conda.add("pot"; channel="conda-forge")
54+
55+
# Workaround for https://github.com/JuliaPy/PyCall.jl/issues/999: Use conda's version of the library
56+
if !Sys.iswindows()
57+
open(ENV["GITHUB_ENV"], "a") do io
58+
println(io, "LD_PRELOAD=", joinpath(Conda.ROOTENV, "lib", "libstdc++.so.6"))
59+
end
60+
end
61+
shell: julia --project=. --color=yes {0}
6662
- uses: julia-actions/julia-runtest@v1
67-
with:
68-
coverage: ${{ matrix.coverage || false }}
69-
env:
70-
PYTHON: ${{ matrix.python }}
7163
- uses: julia-actions/julia-processcoverage@v1
72-
if: matrix.coverage
7364
- uses: codecov/codecov-action@v2
74-
if: matrix.coverage
7565
with:
76-
file: lcov.info
66+
files: lcov.info
7767
- uses: coverallsapp/github-action@master
78-
if: matrix.coverage
7968
with:
80-
github-token: ${{ secrets.GITHUB_TOKEN }}
81-
path-to-lcov: ./lcov.info
69+
github-token: ${{ secrets.GITHUB_TOKEN }}
70+
path-to-lcov: ./lcov.info
71+
flag-name: run-${{ matrix.version }}
72+
parallel: true
73+
finish:
74+
needs: test
75+
runs-on: ubuntu-latest
76+
steps:
77+
- name: Coveralls Finished
78+
uses: coverallsapp/github-action@master
79+
with:
80+
github-token: ${{ secrets.github_token }}
81+
parallel-finished: true

Project.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ PyCall = "1"
1111
julia = "1"
1212

1313
[extras]
14+
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
1415
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1516

1617
[targets]
17-
test = ["Pkg"]
18+
test = ["Conda", "Pkg"]

0 commit comments

Comments
 (0)