From 409d5411f2e4e4636e862cea356941b746eac52c Mon Sep 17 00:00:00 2001 From: kimikage Date: Wed, 11 Nov 2020 16:36:06 +0900 Subject: [PATCH] Update CI settings (#51) --- .github/workflows/CompatHelper.yml | 4 +- .github/workflows/TagBot.yml | 8 +++- .github/workflows/ci.yml | 68 +++++++++++++++++++++++++++ .github/workflows/codeql-analysis.yml | 4 +- .travis.yml | 28 ----------- README.md | 2 +- test/runtests.jl | 2 + 7 files changed, 81 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index ce8d353..da266b9 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -1,9 +1,8 @@ name: CompatHelper - on: schedule: - cron: '00 00 * * *' - + workflow_dispatch: jobs: CompatHelper: runs-on: ubuntu-latest @@ -13,4 +12,5 @@ jobs: - name: CompatHelper.main() env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} run: julia -e 'using CompatHelper; CompatHelper.main()' diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index d77d3a0..f49313b 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -1,11 +1,15 @@ name: TagBot on: - schedule: - - cron: 0 * * * * + issue_comment: + types: + - created + workflow_dispatch: jobs: TagBot: + if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' runs-on: ubuntu-latest steps: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} + ssh: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b508ebf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,68 @@ +name: CI +on: + - push + - pull_request + +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + version: + - '1.0' + - '1' + - 'nightly' + os: + - ubuntu-latest + - windows-latest + - macos-latest + arch: + - x64 + include: + - os: ubuntu-latest + version: '1' + arch: x86 + steps: + - name: Install librsvg2-bin + if: matrix.os == 'ubuntu-latest' + run: sudo apt-get install librsvg2-bin + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + show-versioninfo: true + - uses: actions/cache@v1 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - uses: julia-actions/julia-runtest@latest + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info + + docs: + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' + - run: | + julia --project=docs -e ' + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate()' + - run: julia --project=docs --color=yes docs/make.jl + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 812c48b..1396a89 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -8,7 +8,7 @@ on: branches: [master] schedule: - cron: '0 11 * * 0' - + workflow_dispatch: jobs: analyze: name: Analyze @@ -38,7 +38,7 @@ jobs: with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. + # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6041ee1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Documentation: http://docs.travis-ci.com/user/languages/julia/ -language: julia -os: - - linux -addons: - apt: - packages: - - librsvg2-bin -julia: - - 1.0 - - 1 - - nightly -notifications: - email: false -jobs: - allow_failures: - - julia: nightly - fast_finish: true - include: - - stage: Documentation - julia: 1 - script: - - julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); - Pkg.instantiate()' - - julia --project=docs/ docs/make.jl - after_success: skip -after_success: - - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())' diff --git a/README.md b/README.md index 110397f..3f72381 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ [![Docs Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://kimikage.github.io/ProfileSVG.jl/stable) [![Docs Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://kimikage.github.io/ProfileSVG.jl/dev) +[![CI](https://github.com/kimikage/ProfileSVG.jl/workflows/CI/badge.svg)](https://github.com/kimikage/ProfileSVG.jl/actions?query=workflow%3ACI) [![PkgEval](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/P/ProfileSVG.svg)](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html) -[![Build Status](https://travis-ci.com/kimikage/ProfileSVG.jl.svg?branch=master)](https://travis-ci.com/kimikage/ProfileSVG.jl) [![Codecov](https://codecov.io/gh/kimikage/ProfileSVG.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/kimikage/ProfileSVG.jl) ## Purpose diff --git a/test/runtests.jl b/test/runtests.jl index 7719df3..2ba2ef0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,6 @@ using ProfileSVG using Test +using Profile using FlameGraphs using Base.StackTraces: StackFrame @@ -257,6 +258,7 @@ end # For these tests to work you need `rsvg-convert` installed. # On Ubuntu this is `sudo apt install librsvg2-bin`. @testset "profview" begin + Profile.init(n=10000) # prevent stack overflow (on 32-bit systems) profile_test(1) # to compile @profview profile_test(10)