CompatHelper #851
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: CompatHelper | |
on: | |
schedule: | |
- cron: '00 00 * * *' | |
workflow_dispatch: | |
jobs: | |
CompatHelper: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: julia-actions/setup-julia@latest | |
with: | |
version: 'nightly' | |
- name: "Install Clang_jll (for nightly)" | |
shell: julia --color=yes {0} | |
run: | | |
import Pkg | |
Pkg.add("Clang_jll") | |
import Clang_jll | |
open(ENV["GITHUB_ENV"], "a") do io | |
println(io, "new_clang_jll=", Clang_jll.artifact_dir) | |
println(io, "new_llvm_lib=", Base.libllvm_path()) | |
end | |
- uses: julia-actions/setup-julia@latest | |
with: | |
version: '1.6' | |
- name: "Run CompatHelper" | |
shell: julia --color=yes {0} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} | |
run: | | |
import Pkg | |
Pkg.add("Clang_jll") | |
Pkg.add("CompatHelper") | |
import Clang_jll | |
import CompatHelper | |
# hack in a hook for generating new libclang bindings after Project.toml is updated | |
struct HACK end | |
function CompatHelper.modify_project_toml( | |
name::AbstractString, | |
repo_path::AbstractString, | |
brand_new_compat::AbstractString, | |
bump_version::HACK, | |
) | |
CompatHelper.modify_project_toml(name, repo_path, brand_new_compat, false) | |
if Clang_jll.artifact_dir != "${{ env.new_clang_jll }}" | |
run(`$(Base.julia_cmd().exec[1]) --project -e "import Pkg ; Pkg.instantiate() ; Pkg.build()"`) | |
run(`$(Base.julia_cmd().exec[1]) --project deps/generate.jl $("${{ env.new_clang_jll }}/lib/libclang.so") $("${{ env.new_llvm_lib }}")`) | |
end | |
end | |
CompatHelper.main(include_jll = true, bump_version = HACK()) |