From cc45a6ab3261575cdb010a7e69e7918c8f1b5cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Thu, 24 Jun 2021 23:55:00 +0100 Subject: [PATCH] Move CI to GitHub Actions --- .github/workflows/TagBot.yml | 8 ++++-- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++ .travis.yml | 18 ------------- appveyor.yml | 43 ------------------------------ 4 files changed, 57 insertions(+), 63 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index 76b3820..f49313b 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -1,11 +1,15 @@ name: TagBot on: - schedule: - - cron: 27 15 * * * + 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..d19de4a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: CI + +on: + push: + branches: "master" + tags: ["*"] + pull_request: + release: + +jobs: + test: + name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ matrix.julia-arch }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + julia-version: + - "1.0" + - "1" + - "nightly" + os: + - ubuntu-latest + - macos-latest + - windows-latest + julia-arch: + - x64 + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.julia-version }} + arch: ${{ matrix.julia-arch }} + - name: Cache artifacts + uses: actions/cache@v2 + env: + cache-name: cache-artifacts + with: + path: | + ~/.julia/artifacts + ~/.julia/registries + 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-buildpkg@latest + - uses: julia-actions/julia-runtest@latest + - uses: julia-actions/julia-uploadcodecov@v0.1 + continue-on-error: true + - uses: julia-actions/julia-uploadcoveralls@v0.1 + continue-on-error: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3f77887..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -# Documentation: http://docs.travis-ci.com/user/languages/julia/ -language: julia -os: - - linux - - osx -julia: - - 1.0 - - 1 - - nightly -git: - depth: 999999 -notifications: - email: false -# script: -# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi -# - julia -e 'import Pkg; Pkg.add(Pkg.PackageSpec(path=pwd())); Pkg.build("PolynomialRoots"); Pkg.test("PolynomialRoots"; coverage=true)' -after_success: - - julia -e 'cd(Pkg.dir("PolynomialRoots")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())' diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index cb8a7b7..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,43 +0,0 @@ -environment: - matrix: - - julia_version: 1.0 - - julia_version: 1 - - julia_version: nightly - -platform: - - x86 # 32-bit - - x64 # 64-bit - -# Uncomment the following lines to allow failures on nightly julia -# (tests will run but not make your overall status red) -matrix: - allow_failures: - - julia_version: nightly - -branches: - only: - - master - - /release-.*/ - -notifications: - - provider: Email - on_build_success: false - on_build_failure: false - on_build_status_changed: false - -install: - - ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1")) - -build_script: - - echo "%JL_BUILD_SCRIPT%" - - C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%" - -test_script: - - echo "%JL_TEST_SCRIPT%" - - C:\julia\bin\julia -e "%JL_TEST_SCRIPT%" - -# # Uncomment to support code coverage upload. Should only be enabled for packages -# # which would have coverage gaps without running on Windows -# on_success: -# - echo "%JL_CODECOV_SCRIPT%" -# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"