https://github.com/peteruhnak/hapao-coverage
A bunch of scripts to run hapao coverage on Travis and upload results to S3
https://github.com/peteruhnak/hapao-coverage
Last synced: about 2 months ago
JSON representation
A bunch of scripts to run hapao coverage on Travis and upload results to S3
- Host: GitHub
- URL: https://github.com/peteruhnak/hapao-coverage
- Owner: peteruhnak
- License: mit
- Created: 2017-05-28T18:48:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-21T07:12:50.000Z (over 7 years ago)
- Last Synced: 2025-02-09T18:52:05.192Z (3 months ago)
- Language: Shell
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Experimental Hapao-based Coverage for Travis
A bunch of scripts to run hapao coverage on Travis and upload results to S3.
Package cache included.Experimental... anything can change at any moment.
## Hapao Coverage
hapao: http://hapao.dcc.uchile.cl/ , http://forum.world.st/ANN-Test-Coverage-with-Hapao-td4778403.html
run hapao coverage, export it to html and upload to S3 bucket
The coverage script installs more packages, however it uses a its own copy of the image, so the actual built image is not changed.
1. provide encrypted access keys to S3 bucket
```
travis encrypt KEY
```note: `--add` option will break the formatting, so maybe
```
travis encrypt KEY >> .travis.yml
```2. change the bucket name and region
```
bucket: "your-bucket-name"
region: eu-central-1
```3. change the bucket dir
for project `openponk/xmi` and build `20` this will create a folder `openponk/xmi/20`
```yaml
upload-dir: $TRAVIS_REPO_SLUG/$TRAVIS_BUILD_NUMBER
```For matrix builds using `$TRAVIS_JOB_NUMBER` is preferable, as all jobs share the same build number
e.g. `openponk/xmi/14.1` and `openponk/xmi/14.2`
```yaml
upload-dir: $TRAVIS_REPO_SLUG/$TRAVIS_JOB_NUMBER
```## Example .travis.yml (Travis CI)
```yaml
language: smalltalk
sudo: falseos:
- linuxsmalltalk:
- Pharo-6.0cache:
directories:
- $SMALLTALK_CI_BUILD_BASE/pharo-local/package-cacheafter_success:
- wget -O- https://raw.githubusercontent.com/peteruhnak/hapao-coverage/master/hapao-coverage.sh | bashdeploy:
provider: s3
access_key_id:
secure: ENCRYPTED
secret_access_key:
secure: ENCRYPTED
bucket: "your-bucket-name"
region: eu-central-1
local_dir: coverage-result
upload-dir: $TRAVIS_REPO_SLUG/$TRAVIS_BUILD_NUMBER
skip-cleanup: true
on:
branch: master
```## Example .gitlab-ci.yml (GitLab Runner)
```yaml
variables:
DEFAULT_DEPS: "libc6:i386 libuuid1:i386 libfreetype6:i386 libssl1.0.0:i386"
PHARO_DEPS: "$DEFAULT_DEPS libcairo2:i386"before_script:
# Set 32bit and update apt
- sudo dpkg --add-architecture i386
- sudo apt-get update -yqq
# Install dependencies
- echo "Installing dependencies"
- sudo apt-get install -y --no-install-recommends $PHARO_DEPS
# Install smalltalkCI
- pushd $HOME > /dev/null
- echo 'Downloading and extracting smalltalkCI'
- wget -q -O smalltalkCI.zip https://github.com/hpi-swa/smalltalkCI/archive/master.zip
- unzip -q -o smalltalkCI.zip
- pushd smalltalkCI-* > /dev/null
- source env_vars
- popd > /dev/null
- popd > /dev/nullstages:
- build
- deploybuild:
stage: build
script:
- $SMALLTALK_CI_HOME/run.sh -s "Pharo-6.0"deploy:
```
(powershell)
```ps
Set-PSReadlineOption -HistorySaveStyle SaveNothing
configure-hapao.ps1 -Repository Z:\Path\To\Repo -AccessKey KEY -SecretKey KEY
```or use CSV file with credentials exported from AWS
```ps
configure-hapao.ps1 -Repository Z:\Path\To\Repo -AccessKeysCsv Z:\Path\To\AccessKeys.csv
```the script will ask interactively if the options were not provided