From 218d42dee8b704c07cd989db1a7bf6546d47d5bb Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Tue, 21 Jul 2020 13:00:16 +0800 Subject: [PATCH] [CI] use Github Actions and update test targets * move CI workloads to Github Actions * remove windows 32bit and say goodbye to appveyor * test aarch64 for Julia 1.0, 1, and nightly in travis * add linux 32bit for Julia 1 --- .github/workflows/UnitTest.yml | 55 ++++++++++++++++++++++++++++++++++ .travis.yml | 8 ++--- README.md | 19 ++++++++++-- appveyor.yml | 37 ----------------------- 4 files changed, 74 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/UnitTest.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/UnitTest.yml b/.github/workflows/UnitTest.yml new file mode 100644 index 00000000..7ecb5930 --- /dev/null +++ b/.github/workflows/UnitTest.yml @@ -0,0 +1,55 @@ +name: Unit test + +on: + create: + tags: + push: + branches: + - master + pull_request: + schedule: + - cron: '20 00 1 * *' + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail_fast: false + matrix: + julia-version: ['1.0', '1', 'nightly'] + os: [ubuntu-latest, windows-latest, macOS-latest] + julia-arch: [x64] + # only test one 32-bit job + include: + - os: ubuntu-latest + julia-version: '1' + julia-arch: x86 + + steps: + - uses: actions/checkout@v2 + - name: "Set up Julia" + uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.julia-version }} + arch: ${{ matrix.julia-arch }} + + - name: Cache artifacts + 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 }}- + - name: "Unit Test" + uses: julia-actions/julia-runtest@master + + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info + + diff --git a/.travis.yml b/.travis.yml index 03b472c4..a3960129 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,12 @@ language: julia os: - linux - - osx julia: - 1.0 - 1 - nightly +arch: + - arm64 notifications: email: false - -after_success: - # push coverage results to Codecov - - julia -e 'using Pkg; cd(Pkg.dir("FixedPointNumbers")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' +codecov: true diff --git a/README.md b/README.md index 0be8644a..0366ace5 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # FixedPointNumbers -[![Build Status](https://travis-ci.org/JuliaMath/FixedPointNumbers.jl.svg?branch=master)](https://travis-ci.org/JuliaMath/FixedPointNumbers.jl) -[![PkgEval](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/F/FixedPointNumbers.svg)](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html) -[![codecov.io](http://codecov.io/github/JuliaMath/FixedPointNumbers.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaMath/FixedPointNumbers.jl?branch=master) +[![Build Status][action-img]][action-url] +[![Build Status][pkgeval-img]][pkgeval-url] +[![coverage][codecov-img]][codecov-url] This library implements fixed-point number types. A [fixed-point number] represents a fractional, or @@ -142,3 +142,16 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md) for information about improving th [overflow]: https://en.wikipedia.org/wiki/Integer_overflow [rounding]: https://en.wikipedia.org/wiki/Round-off_error [underflow]: https://en.wikipedia.org/wiki/Arithmetic_underflow + + + + +[action-img]: https://github.com/JuliaMath/FixedPointNumbers.jl/workflows/Unit%20test/badge.svg +[action-url]: https://github.com/JuliaMath/FixedPointNumbers.jl/actions + +[pkgeval-img]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/F/FixedPointNumbers.svg +[pkgeval-url]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html + +[codecov-img]: https://codecov.io/gh/JuliaMath/FixedPointNumbers.jl/branch/master/graph/badge.svg +[codecov-url]: https://codecov.io/gh/JuliaMath/FixedPointNumbers.jl + diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 96cfc7b6..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,37 +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: latest - -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%"