Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor regenerate-mlir-bindings.yml workflow #204

Merged
merged 8 commits into from
Oct 28, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/regenerate-mlir-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,22 @@ jobs:
run: |
import Pkg
Pkg.add("JuliaFormatter")
- run: julia --project=. -e 'using Pkg; pkg"instantiate"; pkg"update"; pkg"precompile"; using Clang; Clang.JLLEnvs.get_system_includes()'
- name: Instantiate dependencies
shell: julia --project=. --color=yes {0}
run: |
using Pkg
pkg"instantiate"
pkg"update"
pkg"precompile"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

┌ Warning: The Pkg REPL mode is intended for interactive use only, and should not be used from scripts. It is recommended to use the functional API instead.
└ @ Pkg.REPLMode /opt/hostedtoolcache/julia/1.10.5/x64/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:382

Also i think we dont want to update:

Suggested change
pkg"instantiate"
pkg"update"
pkg"precompile"
Pkg.instantiate()
Pkg.precompile()

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I've never agreed with that message. I would argue that a script is an interactive use and that you shouldn't use it in a library which uses Pkg.
Anyway, we can change it. No problem.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About update... I always call update by default. Update does more than the other commands and it has solved problems I had with the dependencies many times.

using Clang
Clang.JLLEnvs.get_system_includes()
working-directory: ./deps/ReactantExtra
env:
JULIA_DEPOT_PATH: ${{ runner.temp }}/julia_depot
- run: julia --project=. make-bindings.jl
- run: julia --project=. --color=yes make-bindings.jl
working-directory: ./deps/ReactantExtra
env:
JULIA_DEPOT_PATH: ${{ runner.temp }}/julia_depot
- run: |
chmod -R u+rw ./src/mlir/Dialects/
chmod u+rw ./src/mlir/libMLIR_h.jl
chmod u-x ./src/mlir/libMLIR_h.jl
- name: Format code
shell: julia --color=yes {0}
run: |
Expand Down
Loading