Skip to content

extract a template file #6

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shlomif
Copy link

@shlomif shlomif commented Feb 13, 2025

A stepping stone in extracting a locally-runnable build program

@shlomif
Copy link
Author

shlomif commented Feb 15, 2025

Hi @andrewmd5 ! As the changes in this pull-request are the first step I took towards fulfilling the task in #4 ("How to build the project on a local Linux/Unix/etc. system") , I would appreciate reviewing and merging it. Thanks!

Shabbath Shalom

Comment on lines +109 to +110
ccflags='$ccflags -DBIG_TIME -DNO_MATHOMS -Wno-implicit-function-declaration -D_WASI_EMULATED_PROCESS_CLOCKS -lwasi-emulated-process-clocks -D_WASI_EMULATED_GETPID -lwasi-emulated-getpid -D_GNU_SOURCE -D_POSIX_C_SOURCE -Wno-null-pointer-arithmetic -D_WASI_EMULATED_SIGNAL -lwasi-emulated-signal -include /opt/wasi-sdk/share/wasi-sysroot/include/wasm32-wasi/fcntl.h -I[% github_workspace %]/stubs'
cppflags='-lm -Wno-implicit-function-declaration -DBIG_TIME -DNO_MATHOMS -D_WASI_EMULATED_PROCESS_CLOCKS -lwasi-emulated-process-clocks -D_WASI_EMULATED_GETPID -lwasi-emulated-getpid -D_GNU_SOURCE -D_POSIX_C_SOURCE -DSTANDARD_C -DPERL_USE_SAFE_PUTENV -D_WASI_EMULATED_SIGNAL -lwasi-emulated-signal -Wno-null-pointer-arithmetic -fno-strict-aliasing -pipe -fstack-protector-strong -include /opt/wasi-sdk/share/wasi-sysroot/include/wasm32-wasi/fcntl.h -I[% github_workspace %]/stubs'
Copy link

@teohhanhui teohhanhui Jun 7, 2025

Choose a reason for hiding this comment

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

The placeholder shouldn't be called github_workspace.

The default working directory on the runner for steps, and the default location of your repository when using the checkout action.

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context

So perhaps project_directory?

(It'd probably make sense to pass this as $1, so that no templating is necessary?)

Copy link
Author

Choose a reason for hiding this comment

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

Hi. Where do you see project_directory? Moreover, positional parameters ( $1 ) are less reliable, robust, and powerful than named template fields.

Copy link

@teohhanhui teohhanhui Jun 7, 2025

Choose a reason for hiding this comment

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

project_directory is my suggestion, because that's what this path is.

positional parameters ( $1 ) are less reliable, robust, and powerful than named template fields.

The user will be forced to run an additional step to substitute variables to prepare the template for use (e.g. with envsubst), so I'm not sure that's worth it for a simple shell script.

Perhaps a good compromise is to just read a PROJECT_DIR env var directly from the script.

@shlomif
Copy link
Author

shlomif commented Jul 8, 2025

@andrewmd5 and all: ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants