CI #733
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 | |
# Run on master, tags, or any pull request | |
on: | |
schedule: | |
- cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST) | |
push: | |
branches: [master] | |
tags: ["*"] | |
pull_request: | |
jobs: | |
test: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
# LTS release currently unsupported - see https://github.com/invenia/FTPClient.jl/pull/101#issuecomment-644388576 | |
# - "1.0" # LTS | |
- "1" # Latest Release | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
- windows-latest | |
arch: | |
- x64 | |
- x86 | |
exclude: | |
# Test 32-bit only on Linux | |
- os: macOS-latest | |
arch: x86 | |
- os: windows-latest | |
arch: x86 | |
include: | |
# Add a 1.6 job because that's what Invenia actually uses | |
- os: ubuntu-latest | |
version: 1.6 | |
arch: x64 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' # pyftpdlib is not currently compatible with Python 3.9 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- if: matrix.os != 'windows-latest' | |
run: | | |
python3.8 -m pip install --upgrade pip setuptools | |
python3.8 -m pip install pyopenssl pyftpdlib | |
- if: matrix.os != 'windows-latest' && matrix.arch != 'x86' | |
run: | | |
echo "PYTHON=$pythonLocation/bin/python3.8" >> $GITHUB_ENV | |
- if: matrix.os != 'windows-latest' && matrix.arch == 'x86' | |
run: | | |
echo "PYTHON=''" >> $GITHUB_ENV | |
# Windows uses different python syntax | |
- if: matrix.os == 'windows-latest' | |
run: | | |
py -3.8 -m pip install --upgrade pip setuptools | |
py -3.8 -m pip install pyopenssl pyftpdlib | |
echo "PYTHON=$env:pythonLocation\python.exe" >> $env:GITHUB_ENV | |
- uses: actions/cache@v2 | |
env: | |
cache-name: cache-artifacts | |
with: | |
path: ~/.julia/artifacts | |
key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}- | |
${{ runner.os }}-${{ matrix.arch }}-test- | |
${{ runner.os }}-${{ matrix.arch }}- | |
${{ runner.os }}- | |
- uses: julia-actions/julia-buildpkg@latest | |
env: | |
CONDA_JL_VERSION: '3' | |
- uses: julia-actions/julia-runtest@latest | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v1 | |
with: | |
file: lcov.info | |
slack: | |
name: Notify Slack Failure | |
needs: test | |
runs-on: ubuntu-latest | |
if: always() && github.event_name == 'schedule' | |
steps: | |
- uses: technote-space/workflow-conclusion-action@v2 | |
- uses: voxmedia/github-action-slack-notify-build@v1 | |
if: env.WORKFLOW_CONCLUSION == 'failure' | |
with: | |
channel: nightly-dev | |
status: FAILED | |
color: danger | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.DEV_SLACK_BOT_TOKEN }} |