Plots.jl/.github/workflows/SnoopCompile.yml
Workflow config file is invalid. Please check your config file: yaml: line 23: did not find expected '-' indicator
Daniel Schwabeneder fc89578536
Update .github/workflows/SnoopCompile.yml
Co-authored-by: Amin Yahyaabadi <aminyahyaabadi74@gmail.com>
2020-06-30 23:35:51 +02:00

98 lines
3.4 KiB
YAML

name: SnoopCompile
on:
push:
branches:
# - 'master' # NOTE: to run the bot only on pushes to master
defaults:
run:
shell: bash
jobs:
SnoopCompile:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
env:
GKS_ENCODING: "utf8"
GKSwstype: "100"
PLOTS_TEST: "true"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version: # NOTE: the versions below should match those in your botconfig
- '1.3'
- '1.4'
- '1.5.0-rc1'
- 'nightly'
os: # NOTE: should match the os setting of your botconfig
- ubuntu-latest
- windows-latest
- macos-latest
arch:
- x64
steps:
# Setup environment
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
- name: Install dependencies
run: |
julia --project -e 'using Pkg; Pkg.instantiate();'
julia -e 'using Pkg; Pkg.add(PackageSpec(url = "https://github.com/timholy/SnoopCompile.jl")); Pkg.develop(PackageSpec(; path=pwd())); using SnoopCompile; SnoopCompile.addtestdep();'
# TESTCMD
- name: Default TESTCMD
run: echo ::set-env name=TESTCMD::"julia"
- name: Ubuntu TESTCMD
if: startsWith(matrix.os,'ubuntu')
run: echo ::set-env name=TESTCMD::"xvfb-run julia"
# Generate precompile files
- name: Generating precompile files
run: $TESTCMD --project -e 'include("deps/SnoopCompile/snoop_bot.jl")' # NOTE: must match path
# Run benchmarks
- name: Running Benchmark
run: $TESTCMD --project -e 'include("deps/SnoopCompile/snoop_bench.jl")' # NOTE: optional, if have benchmark file
- name: Upload all
uses: actions/upload-artifact@v2
with:
path: ./
Create_PR:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
needs: SnoopCompile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download all
uses: actions/download-artifact@v2
- name: Move the content of the directory to the root
run: |
rsync -a artifact/* ./
rm -d -r artifact
- name: Discard unrelated changes
run: |
test -f 'Project.toml' && git checkout -- 'Project.toml'
git ls-files 'Manifest.toml' | grep . && git checkout -- 'Manifest.toml'
(git diff -w --no-color || git apply --cached --ignore-whitespace && git checkout -- . && git reset && git add -p) || echo done
- name: Format precompile_includer.jl
run: julia -e 'using Pkg; Pkg.add("JuliaFormatter"); using JuliaFormatter; format_file("src/precompile_includer.jl")'
- name: Create Pull Request
# https://github.com/marketplace/actions/create-pull-request
uses: peter-evans/create-pull-request@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update precompile_*.jl file
# committer: Daniel Schwabender <daschw@disroot.org> # NOTE: change `committer` to your name and your email.
title: "[AUTO] Update precompiles"
labels: SnoopCompile
branch: "SnoopCompile_AutoPR"
Skip:
if: "contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- name: Skip CI 🚫
run: echo skip ci