Skip to content

Commit

Permalink
Merge #48
Browse files Browse the repository at this point in the history
48: Switch to Github Action docker-based CI r=charleskawczynski a=charleskawczynski

Since we've been having build/environment issues, I thought it might be worth giving a docker-based CI a try. The way this works is:

 - CI is now controlled by a Github Action
 - The GHA checks out the PR/master and builds a docker image on top of the Julia docker image
 - The docker image is then used to run the tests

The hope is that this will stabilize the build environment since everything is built from docker, which should be a clean slate each build, rather than runners whose environments potentially change (which was the case for the last failure on Travis).

This also removes a handful of deps and source code, but we'll add these back in incrementally.

Co-authored-by: Charles Kawczynski <[email protected]>
  • Loading branch information
bors[bot] and charleskawczynski authored Apr 5, 2020
2 parents c6180f2 + e89812a commit 074dc3f
Show file tree
Hide file tree
Showing 11 changed files with 95 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",
]
delete_merged_branches = true
timeout_sec = 86400
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/dockerci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: DockerCI

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

jobs:
dockerci:
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 and test
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 074dc3f

Please sign in to comment.