Various performance and memory optimizations #451
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: Custom Commands | |
on: | |
pull_request: | |
jobs: | |
custom_actions: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Wait for commands | |
id: read_commands | |
run: | | |
ci_commands=$(curl -sH "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X GET "${{ github.event.pull_request.comments_url }}" | jq -r ".[] | select(.body | startswith(\"/run-actions\")) | .body") | |
if [ ! -z "$ci_commands" ]; then | |
echo "Read commands $ci_commands" | |
echo "ci_commands=$ci_commands" >> $GITHUB_OUTPUT | |
break | |
fi | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: '1.9' | |
arch: 'x64' | |
- name: Run provided commands | |
run: | | |
echo "Got custom commands:" | |
ci_commands="${{ steps.read_commands.outputs.ci_commands }}" | |
echo $ci_commands | |
if echo "$ci_commands" | grep -q benchmark; then | |
echo "Running benchmarks..." | |
julia -e 'using Pkg; Pkg.add("BenchmarkTools"); Pkg.develop(;path=pwd())' | |
JULIA_PROJECT=$PWD julia --project benchmarks/benchmark.jl | |
fi | |
if echo "$ci_commands" | grep -q premerge; then | |
echo "Running pre-merge checks..." | |
julia -e 'using Pkg; Pkg.add("Aqua"); Pkg.develop(;path=pwd())' | |
JULIA_PROJECT=$PWD julia --project -e 'using Aqua, Dagger; Aqua.test_all(Dagger)' | |
fi | |
env: | |
BENCHMARK: "nmf:raw,dagger" | |
BENCHMARK_SCALE: "5:5:10" |