johnnychen94 / Workflows.jl

MIT License
10 stars 1 forks source link

interpolate environment variables #16

Open johnnychen94 opened 2 years ago

johnnychen94 commented 2 years ago

A typical usage could be:

[[tasks]]
    runner = "shell"
    [tasks.run]
        command = "julia --threads=${{ env.JULIA_NUM_THREADS }} main.jl"
johnnychen94 commented 2 years ago

~Because we can't ensure environment variables are properly set, it's perhaps better to support this after #35 so that we can introduce the default filter to guard the values.~

A solution is to provide .env file as fallback environment variables, e.g.,

# .env
CUDA_VISIBLE_DEVICES=1
JULIA_NUM_THREADS=8