Skip to content

Commit

Permalink
[ci] Fix travis issue with libffmpeg test
Browse files Browse the repository at this point in the history
This way ensures that despite the caching done in our CI/CD, the
replacement scripts still work, and what we pull is clean.

Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>

Update ffmpeg error to not fail CI

- updates the ffmpeg error in the post-install script so
that it displays a soft error instead of throwing an error
and failing the CI.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>

[ci] cleanup electron before saving cache

Make use of the "before_cache" section in .travis.yml, to remove
electron and realted files, before the cache is updated. This
makes sure that the libffmpeg test is run fresh, for CI jobs that
benefit from the cache, so we can detect eventual problems ASAP.

Signed-off-by: Marc Dumais <marc.dumais@ericsson.com>
  • Loading branch information
paul-marechal authored and akosyakov committed Jul 1, 2019
1 parent e206bd3 commit d89a881
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ cache:
# end_cache_directories
- packages/java-debug/download
- packages/debug-nodejs/download
before_cache:
# Runs before the cache is updated, after successful CI
- rm -f node_modules/@theia/electron/post-install.log
- rm -rf node_modules/@theia/electron/download
- rm -rf node_modules/electron
branches:
only:
- master
Expand Down Expand Up @@ -97,8 +102,9 @@ before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0
- export PATH=$HOME/.yarn/bin:$PATH
install:
- THEIA_SKIP_NPM_PREPARE=1 yarn install
- npx electron-codecs-test
- THEIA_SKIP_NPM_PREPARE=1 yarn install --skip-integrity-check
- npx electron-replace-ffmpeg # re-download library (in case it was cached)
- npx electron-codecs-test # test library
- yarn prepare
- scripts/check_git_status.sh
script:
Expand Down Expand Up @@ -132,7 +138,7 @@ jobs:
install: skip
before_deploy:
- |
if ! [ "$BEFORE_DEPLOY_RUN" ]; then
if ! [ "$BEFORE_DEPLOY_RUN" ]; then
export BEFORE_DEPLOY_RUN=1
printf "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}\n" >> ~/.npmrc
yarn
Expand Down
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ install:
- netsh advfirewall firewall add rule name="SeleniumIn" dir=in action=allow protocol=TCP localport=4444
- netsh advfirewall firewall add rule name="SeleniumOut" dir=out action=allow protocol=TCP localport=4444
- cmd: set THEIA_SKIP_NPM_PREPARE=1 && yarn install
- npx rimraf node_modules/@theia/electron/download
- npx electron-replace-ffmpeg
- npx electron-codecs-test

before_build:
Expand Down
2 changes: 1 addition & 1 deletion scripts/post-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async function main() {
console.log('@theia/electron last logs:');
console.log(fs.readFileSync(electronCodecTestLogPath, { encoding: 'utf8' }).trimRight());
} else if (!process.env.THEIA_ELECTRON_SKIP_REPLACE_FFMPEG) {
throw new Error('Cannot find the log file for the Electron codecs test.');
console.error('Cannot find the log file for the Electron codecs test.');
}
}

Expand Down

0 comments on commit d89a881

Please sign in to comment.