Skip to content

Replace misc/build_artifacts.hs with shell scripts in .github/workflows/build.yaml #197

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

Merged

Conversation

msakai
Copy link
Owner

@msakai msakai commented May 22, 2025

No description provided.

@msakai msakai force-pushed the feature/replace-build-artifact-with-github-actions-script branch from f4d92f6 to 5ed5094 Compare May 22, 2025 15:30
@msakai msakai requested a review from Copilot May 23, 2025 16:27
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the Haskell misc/build_artifacts.hs invocation and replaces it with inline shell scripting in the GitHub Actions workflow to collect and package build artifacts, while also extending the stack-no-global condition to cover an additional platform.

  • Broaden stack-no-global flag to include linux-x86_64-static.
  • Drop the Haskell script and add a Bash block to locate executables, copy libraries, samples, and docs, then archive per OS.
  • Handle Windows path translation, .exe suffix, and DLL import library generation.
Files not reviewed (1)
  • misc/build_artifacts.hs: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/build.yaml:191

  • Ensure that all lines under the run: | block are indented at least two spaces deeper than the run declaration; improper indentation can break the YAML and cause the script step to fail.
exe_names=(

Comment on lines +191 to +207
exe_names=(
assign
htc
knapsack
nonogram
nqueens
numberlink
shortest-path
sudoku
toyconvert
toyfmf
toyqbf
toysat
toysmt
toysolver
toysolver-check
)
Copy link
Preview

Copilot AI May 23, 2025

Choose a reason for hiding this comment

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

[nitpick] Hard-coding the exe_names array requires manual updates when new executables are added and is error-prone; consider generating this list dynamically (e.g., globbing ${local_install_root}/bin/* or querying the cabal project metadata).

Suggested change
exe_names=(
assign
htc
knapsack
nonogram
nqueens
numberlink
shortest-path
sudoku
toyconvert
toyfmf
toyqbf
toysat
toysmt
toysolver
toysolver-check
)
exe_names=($(find "${local_install_root}/bin" -type f -executable -exec basename {} \;))

Copilot uses AI. Check for mistakes.

@msakai msakai merged commit f0183a2 into master May 24, 2025
9 of 10 checks passed
@msakai msakai deleted the feature/replace-build-artifact-with-github-actions-script branch May 24, 2025 01:17
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.

1 participant