gr: improve print logic #5391
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| ci: | |
| if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
| env: | |
| GKS_ENCODING: "utf8" | |
| GKSwstype: "nul" | |
| JULIA_CONDAPKG_BACKEND: "MicroMamba" | |
| PLOTS_PLOTLYJS_UNSAFE_ELECTRON: "true" | |
| MPLBACKEND: "agg" | |
| name: Julia ${{ matrix.version }} - ${{ matrix.os }} | |
| continue-on-error: ${{ matrix.experimental }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - 'lts' # LTS, also minimum declared julia compat in `Project.toml` | |
| - '1' # latest stable | |
| experimental: | |
| - false | |
| os: [ubuntu-latest, windows-latest, macos-13] # cannot use macos-latest a.k.a macos-14 on x64 (only aarch64) | |
| arch: [x64] | |
| include: | |
| - os: macos-latest | |
| experimental: false | |
| arch: aarch64 | |
| version: '1' | |
| - os: ubuntu-latest | |
| experimental: false | |
| prefix: xvfb-run # add `xvfb-run` prefix julia-actions/julia-runtest/blob/master/README.md | |
| - os: ubuntu-latest | |
| experimental: true | |
| prefix: xvfb-run | |
| version: 'pre' # upcoming julia version, next `rc` | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Ubuntu LaTeX dependencies | |
| 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 fc-cache -vr | |
| - name: Set LD_PRELOAD | |
| if: startsWith(matrix.os, 'ubuntu') | |
| run: echo "LD_PRELOAD=$(g++ --print-file-name=libstdc++.so)" >> $GITHUB_ENV | |
| - uses: julia-actions/setup-julia@latest | |
| with: | |
| version: ${{ matrix.version }} | |
| - uses: julia-actions/cache@v2 | |
| - uses: julia-actions/julia-buildpkg@latest | |
| - name: Run upstream RecipesBase & RecipesPipeline tests | |
| shell: julia --project=@. --color=yes {0} | |
| run: | | |
| using Pkg | |
| foreach(("RecipesBase", "RecipesPipeline")) do name | |
| Pkg.develop(path=name); Pkg.test(name; coverage=true) | |
| end | |
| - 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() | |
| - uses: julia-actions/julia-runtest@latest | |
| 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 | |
| - uses: julia-actions/julia-processcoverage@latest | |
| if: startsWith(matrix.os, 'ubuntu') | |
| with: | |
| directories: RecipesBase/src,RecipesPipeline/src,src | |
| - uses: codecov/codecov-action@v4 | |
| if: startsWith(matrix.os, 'ubuntu') | |
| with: | |
| file: lcov.info | |
| Skip: | |
| if: contains(github.event.head_commit.message, '[skip ci]') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Skip CI 🚫 | |
| run: echo skip ci |