Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

travis and appveyor should move the bulk of its logic to running a nim file #10041

Closed
timotheecour opened this issue Dec 19, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@timotheecour
Copy link
Contributor

commented Dec 19, 2018

something like this:

add koch options: ci_script, before_deploy

so that these work:

nim c -r koch ci_script
nim c -r koch c_before_deploy

then update .travis.yml to just call it:

sudo: false
language: c

dist: trusty

addons:
  apt:
    packages:
    - libcurl4-openssl-dev
    - libsdl1.2-dev
    - libgc-dev
    - libsfml-dev

before_script:
  - set -e
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then unset -f cd; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then shell_session_update() { :; }; fi
  # or maybe: sh build_all.sh
  - git clone --depth 1 https://github.com/nim-lang/csources.git
  - cd csources
  - sh build.sh
  - cd ..
  - export PATH=$(pwd)/bin${PATH:+:$PATH}
script:
  - nim c -r koch ci_script

before_deploy:
  - nim c -r koch ci_before_deploy
deploy:                         # https://nim-lang.github.io/Nim
  provider: pages
  # local-dir *has* to be a relative path from the repo root.
  local-dir: "doc/html"
  skip-cleanup: true
  github-token: "$GITHUB_OAUTH_TOKEN"
  keep-history: false
  on:
    branch: devel

and similar with appveyor

benefits

  • avoid code duplication as much as possible bw appveyor and travis
  • make it easier to run locally what's being run in travis
  • make it easier to port to other CI platforms since all we'd need is a working nim compiler
  • would allow reviving #8552 but doing it in pure nim

@timotheecour timotheecour added the CI label Dec 19, 2018

@narimiran narimiran removed the RFC label Jan 2, 2019

timotheecour added a commit to timotheecour/Nim that referenced this issue Jan 4, 2019

@timotheecour

This comment has been minimized.

Copy link
Contributor Author

commented Jan 4, 2019

=> PR #10183

timotheecour added a commit to timotheecour/Nim that referenced this issue Jan 4, 2019

timotheecour added a commit to timotheecour/Nim that referenced this issue Jan 4, 2019

timotheecour added a commit to timotheecour/Nim that referenced this issue Jan 6, 2019

@timotheecour timotheecour self-assigned this Jan 7, 2019

@Araq Araq closed this in #10183 Jan 8, 2019

Araq added a commit that referenced this issue Jan 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.