Skip to content

Commit

Permalink
Add GHA docker-based CI
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Apr 5, 2020
1 parent c6180f2 commit 3f39fc3
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 935 deletions.
8 changes: 1 addition & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ environment:
- julia_version: nightly

platform:
# Currently, the 32-bit build is taking >1hr, which fails
# and cannot be increased: https://www.appveyor.com/docs/build-configuration/#build-timeout
# TODO: Add 32-bit build back in
# This can likely be fixed by reducing the deps
# - x86 # 32-bit
- x86 # 32-bit
- x64 # 64-bit

# Uncomment the following lines to allow failures on nightly julia
Expand All @@ -35,8 +31,6 @@ notifications:

install:
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))
- pip install --user -U numpy scipy scikit-learn
- C:\julia\bin\julia -e "using Pkg; Pkg.build(\"PyCall\"); Pkg.update()"

build_script:
- echo "%JL_BUILD_SCRIPT%"
Expand Down
3 changes: 1 addition & 2 deletions bors.toml → .github/bors.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
status = [
"continuous-integration/travis-ci/push",
"continuous-integration/appveyor/branch"
"DockerCI / test",
]
delete_merged_branches = true
timeout_sec = 86400
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/dockerci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: DockerCI

on:
push:
branches: [ master, staging, trying ]
pull_request:
branches: [ master, staging, trying ]

jobs:
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1.3, 1.4]
os: [ubuntu-latest]
python: [ '3.x' ]
project: ['CalibrateEmulateSample']

steps:
- uses: actions/checkout@v2
- name: Build
run: |
docker build . --file Dockerfile --tag ces:PR
docker images
docker run ces:PR
- name: "Generate coverage"
env:
JULIA_PROJECT: "@."
run: julia --project=@. -e 'using Pkg;
cd(Pkg.dir("CalibrateEmulateSample"));
Pkg.add("Coverage");
using Coverage;
LCOV.writefile("coverage-lcov.info", Codecov.process_folder())'
if: success()
- name: "Submit coverage"
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
if: success()

23 changes: 1 addition & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,6 @@ julia:
notifications:
email: false

env:
global:
- PYTHON=python3
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get update && sudo apt-get install -qq -y python3-pip
fi
- julia -e 'using Pkg; Pkg.add("Conda")'
- python3 -m pip install --user -U numpy scipy scikit-learn
- julia -e 'using Conda; Conda.add("scikit-learn")'
- julia -e 'using Pkg; Pkg.add("PyCall")'

before_script:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew upgrade cmake
fi
- julia -e 'using Pkg; Pkg.build("PyCall"); Pkg.update()'

after_success:
# push coverage results to Codecov
- julia -e 'import Pkg;
Expand All @@ -61,4 +40,4 @@ jobs:
Pkg.instantiate();
Pkg.build("CalibrateEmulateSample")'
- julia --color=yes --project=docs/ docs/make.jl
after_success: skip
after_success: skip
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ COPY . /CalibrateEmulateSample.jl/

WORKDIR /CalibrateEmulateSample.jl/
RUN julia --project -e "using Pkg; Pkg.instantiate();"
RUN julia --project -e "using CalibrateEmulateSample"
Loading

0 comments on commit 3f39fc3

Please sign in to comment.