Skip to content

Commit

Permalink
fix tests - restore preferences - cleanup (#4914)
Browse files Browse the repository at this point in the history
* rework extension `__init__` mechanism

* checkpoint plotly

* fix `pythonplot`

* format

* more `pythonplot` fixes

* checkpoint replace

* syntax

* fix `plotlyjs`

* restructure modules

* stable `GR`

* checkpoint broken `references` gr

* broken viewport

* fix `dev`

* update

* no project

* remove `--project`

* update

* fix `plotarea`

* fixes

* stable `PlotsBase`

* cleanup

* format

* restrcit gaston to `linux`

* restrcit `PlolyJS` test

* update format

* update action

* update `Aqua`

* cleanup - fix `Plots` tests

* move preferences back to `PlotsBase`

* simplifications

* format

* change versions

* rework ci

* format

* test downstream

* update ci

* move ci scripts

* fix

* fix

* update

* debug ci

* fix

* update versions

* update

* update

* update

* update

* update

* update

* update

* update

* restore CI

* update workflow

* add `PlotsBase` precompile statements

* update tests

* update preference - simplifications

* update test

* update
  • Loading branch information
t-bltg authored Apr 7, 2024
1 parent b1811ba commit d7aa8bc
Show file tree
Hide file tree
Showing 75 changed files with 2,613 additions and 2,713 deletions.
106 changes: 31 additions & 75 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,46 +17,29 @@ jobs:
ci:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
env:
GKS_ENCODING: "utf8"
GKSwstype: "nul"
JULIA_CONDAPKG_BACKEND: "MicroMamba"
MPLBACKEND: "agg"
JULIA_CONDAPKG_BACKEND: MicroMamba
MPLBACKEND: agg
GKS_ENCODING: utf8
GKSwstype: nul
name: Julia ${{ matrix.version }} - ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6' # LTS (minimal declared julia compat in `Project.toml`)
- '1' # latest stable
- '1' # latest stable
- '1.9' # minimal declared julia compat in `Project.toml`
experimental:
- false
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [x64]
include:
- os: ubuntu-latest
experimental: false
prefix: xvfb-run # julia-actions/julia-runtest/blob/master/README.md
- os: ubuntu-latest
experimental: false
prefix: xvfb-run
version: '1.7' # only test intermediate release on `ubuntu` to spare resources
- os: ubuntu-latest
experimental: false
prefix: xvfb-run
version: '1.8' # only test intermediate release on `ubuntu` to spare resources
- os: ubuntu-latest
experimental: false
prefix: xvfb-run
version: '1.9' # only test intermediate release on `ubuntu` to spare resources
- os: ubuntu-latest
experimental: true
prefix: xvfb-run
version: '~1.11.0-0' # upcoming julia version, next `rc`
version: '~1.11.0-0' # upcoming julia version (`alpha`, `beta` or `rc`)
- os: ubuntu-latest
experimental: true
prefix: xvfb-run
version: 'nightly'

steps:
Expand All @@ -66,7 +49,7 @@ jobs:
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -y update
sudo apt-get -y install gnuplot poppler-utils texlive-{latex-base,latex-extra,luatex} g++
sudo apt-get -y install g++ gnuplot poppler-utils texlive-{latex-base,latex-extra,luatex}
sudo fc-cache -vr
- name: Set LD_PRELOAD
Expand All @@ -76,69 +59,42 @@ jobs:
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}

- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@latest

- name: Run upstream RecipesBase, RecipesPipeline tests
shell: julia --project=@. --color=yes {0}
- name: Develop RecipesBase, RecipesPipeline, PlotsBase, Plots
env:
JULIA_PKG_PRECOMPILE_AUTO: 0
shell: julia --color=yes {0}
run: |
using Pkg
foreach(("RecipesBase", "RecipesPipeline")) do name
Pkg.develop(path=name); Pkg.test(name; coverage=true)
end
foreach(path -> Pkg.develop(; path), ("./RecipesBase", "./RecipesPipeline", "./PlotsBase", "."))
- name: Install conda based matplotlib
shell: julia --project=@. --color=yes {0}
run: |
using Pkg; Pkg.add("CondaPkg")
using CondaPkg; CondaPkg.resolve()
libgcc = if Sys.islinux()
# see discourse.julialang.org/t/glibcxx-version-not-found/82209/8
# julia 1.8.3 is built with libstdc++.so.6.0.29, so we must restrict to this version (gcc 11.3.0, not gcc 12.2.0)
# see gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
specs = Dict(
v"3.4.29" => ">=11.1,<12.1",
v"3.4.30" => ">=12.1,<13.1",
v"3.4.31" => ">=13.1,<14.1",
v"3.4.32" => ">=14.1,<15.1",
v"3.4.33" => ">=15.1,<16.1",
# ... keep this up-to-date with gcc 16
)[Base.BinaryPlatforms.detect_libstdcxx_version()]
("libgcc-ng$specs", "libstdcxx-ng$specs")
else
()
end
CondaPkg.PkgREPL.add([libgcc..., "matplotlib"])
CondaPkg.status()
- name: Run upstream PlotsBase tests
shell: julia --project=@. --color=yes {0}
run: |
using Pkg
foreach(("PlotsBase",)) do name
Pkg.develop(path=name); Pkg.test(name; coverage=true)
end
env:
JULIA_PKG_PRECOMPILE_AUTO: 0
run: julia --color=yes ci/matplotlib.jl

- uses: julia-actions/julia-runtest@latest
- name: Test RecipesBase, RecipesPipeline, PlotsBase, Plots
timeout-minutes: 60
with:
prefix: ${{ matrix.prefix }} # for `xvfb-run`

- name: Run downstream tests
if: startsWith(matrix.os, 'ubuntu')
shell: xvfb-run julia --project=@. --color=yes {0}
run: |
using Pkg
foreach(("StatsPlots", "GraphRecipes")) do name
Pkg.activate(tempdir())
foreach(path -> Pkg.develop(; path), ("RecipesBase", "RecipesPipeline", "."))
Pkg.add(name); Pkg.test(name; coverage=true)
end
cmd=(julia --color=yes)
if [ "$RUNNER_OS" == "Linux" ]; then
cmd=(xvfb-run ${cmd[@]})
fi
echo ${cmd[@]}
${cmd[@]} -e '
using Pkg
foreach(name -> Pkg.test(name; coverage=true), ("RecipesBase", "RecipesPipeline", "PlotsBase", "Plots"))
'
- name: Test downstream packages
if: startsWith(matrix.os, 'ubuntu')
run: xvfb-run julia --color=yes ci/downstream.jl

- uses: julia-actions/julia-processcoverage@latest
if: startsWith(matrix.os, 'ubuntu')
with:
directories: RecipesBase/src,RecipesPipeline/src,src
directories: RecipesBase/src,RecipesPipeline/src,PlotsBase/src,src
- uses: codecov/codecov-action@v4
if: startsWith(matrix.os, 'ubuntu')
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Format Julia files
run: |
using JuliaFormatter
format(["RecipesBase", "RecipesPipeline", "src", "test", "ext"])
format(["RecipesBase", "RecipesPipeline", "PlotsBase", "src", "test"])
shell: julia --color=yes --compile=min -O0 {0}
- name: suggester / JuliaFormatter
uses: reviewdog/action-suggester@v1
Expand Down
8 changes: 6 additions & 2 deletions PlotsBase/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "PlotsBase"
uuid = "c52230a3-c5da-43a3-9e85-260fcdfdc737"
version = "1.41.0"
version = "0.1"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand All @@ -19,6 +19,8 @@ NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PlotThemes = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a"
PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down Expand Up @@ -87,6 +89,8 @@ PlotThemes = "2, 3"
PlotUtils = "1"
PlotlyJS = "0.18"
PlotlyKaleido = "2.2.2"
PrecompileTools = "1"
Preferences = "1"
Printf = "1"
PythonPlot = "1"
Random = "1"
Expand All @@ -105,7 +109,7 @@ UnicodePlots = "3"
UnitfulLatexify = "1"
Unzip = "0.1 - 0.2"
UUIDs = "1"
julia = "1.6"
julia = "1.9"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
Loading

0 comments on commit d7aa8bc

Please sign in to comment.