update ci.yml #70
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: [main, develop] | |
tags: ['*'] | |
jobs: | |
test: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name}} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- "1.6" # LTS (64-bit Linux) | |
- "1.7" | |
- "1.8" | |
- '1.9' # latest stable Julia release (Linux) | |
os: | |
- ubuntu-latest | |
arch: | |
- x64 | |
include: # additional tests [Julia-nightly] (Linux) | |
- os: ubuntu-latest | |
version: 'nightly' | |
arch: x64 | |
allow_failure: true | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
name: id_rsa | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
- name: Create a new branch and pull test logs from repo # only push logs if PR is not from a fork | |
if: ${{ ! github.event.pull_request.head.repo.fork }} | |
run: | | |
git checkout -b ${GITHUB_REF#refs/heads/}-testlogs | |
mkdir test/Logs; cd test/Logs | |
git config --global init.defaultBranch main | |
git init | |
git remote add testlog [email protected]:lbonaldo/testlog.git | |
git pull testlog main | |
if [ -d Logs_v${{ matrix.version }} ]; then | |
mv Logs_v${{ matrix.version }}/*.log . | |
else | |
mkdir Logs_v${{ matrix.version }} | |
fi | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/cache@v1 | |
- uses: julia-actions/julia-buildpkg@v1 | |
- uses: julia-actions/julia-runtest@v1 | |
- name: Commit logs and push back to repo # only push logs if PR is not from a fork | |
if: ${{ ! github.event.pull_request.head.repo.fork }} | |
run: | | |
cd ${GITHUB_WORKSPACE}/test/Logs | |
mv *.log Logs_v${{ matrix.version }} | |
git add -f Logs_v${{ matrix.version }} | |
git commit -m "Update test logs for Julia v${{ matrix.version }}" | |
git pull --rebase testlog main # pull again to avoid conflicts from other versions | |
git push testlog main | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v3 | |
with: | |
file: lcov.info |