-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: enhance CI/CD and development workflows (#21)
- Add comprehensive GitHub Actions workflows for CI, benchmarking, and custom actions - Update devcontainer configuration with additional extensions and settings - Introduce custom actions for parsing GNU time output, dumping runner stats, and setting up benchmarks - Update Makefile with more targets and improved dependency management - Add .editorconfig for consistent code formatting - Update rust-toolchain to latest version (1.84.1) - Improve dependency installation and environment setup scripts
- Loading branch information
1 parent
29fe58e
commit 8def52e
Showing
22 changed files
with
11,055 additions
and
208 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
|
||
[Makefile*] | ||
indent_style = tab | ||
|
||
[Dockerfile] | ||
indent_style = tab | ||
|
||
[Dockerfile.**] | ||
indent_style = tab | ||
|
||
[install-dependencies] | ||
indent_style = space | ||
indent_size = 2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: 'Dump System Information' | ||
description: 'Dump system information about the runner' | ||
|
||
inputs: | ||
cpuinfo_path: | ||
description: 'Path to CPU info file' | ||
required: false | ||
default: '/proc/cpuinfo' | ||
os_release_path: | ||
description: 'Path to OS release file' | ||
required: false | ||
default: '/etc/os-release' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Dump runner stats | ||
shell: bash | ||
run: | | ||
echo "=== Runner System Information ===" | ||
echo "CPU Information:" | ||
echo " - Cores: $(nproc)" | ||
echo " - Model: $(grep "model name" ${{ inputs.cpuinfo_path }} | head -n1 | cut -d: -f2 | sed 's/^[ \t]*//')" | ||
echo " - Architecture: $(uname -m)" | ||
echo -e "\nMemory Information:" | ||
echo " - Total RAM: $(free -h | awk '/^Mem:/{print $2}')" | ||
echo " - Available RAM: $(free -h | awk '/^Mem:/{print $7}')" | ||
echo " - Swap: $(free -h | awk '/^Swap:/{print $2}')" | ||
echo -e "\nStorage Information:" | ||
echo " - Available space: $(df -h . | awk 'NR==2{print $4}')" | ||
echo " - Total space: $(df -h . | awk 'NR==2{print $2}')" | ||
echo " - Used space: $(df -h . | awk 'NR==2{print $3}')" | ||
echo " - Use percentage: $(df -h . | awk 'NR==2{print $5}')" | ||
echo -e "\nOperating System:" | ||
echo " - $(cat ${{ inputs.os_release_path }} | grep PRETTY_NAME | cut -d'"' -f2)" | ||
echo " - Kernel: $(uname -r)" | ||
echo "===========================" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage/ | ||
|
||
# nyc test coverage | ||
.nyc_output/ | ||
|
||
# Compiled binary addons | ||
build/Release | ||
|
||
# Dependency files | ||
package-lock.json | ||
yarn.lock | ||
|
||
# Environment variables | ||
.env | ||
.env.local | ||
.env.*.local | ||
|
||
# IDE specific files | ||
.idea/ | ||
.vscode/ | ||
*.swp | ||
*.swo |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# GNU Time Parser Action | ||
|
||
A GitHub Action that parses the output of GNU's `/usr/bin/time -v` command and converts it into structured JSON data. | ||
|
||
## Usage | ||
|
||
Add this action to your workflow: | ||
|
||
```yaml | ||
- uses: ./.github/actions/parse-gnu-time | ||
with: | ||
content: ${{ steps.bench.outputs.time_output }} | ||
``` | ||
## Development | ||
### Install Dependencies | ||
```bash | ||
npm install | ||
``` | ||
|
||
### Run Tests | ||
```bash | ||
npm test | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: 'Parse GNU Time Output' | ||
description: 'Parse and extract metrics from GNU time -v output' | ||
|
||
inputs: | ||
content: | ||
description: 'The time command output content' | ||
required: true | ||
fields: | ||
description: 'Array of field names to include in output' | ||
required: false | ||
default: '["peak_memory_gb", "user_time_seconds", "system_time_seconds"]' | ||
|
||
outputs: | ||
json: | ||
description: 'Parsed metrics in JSON format' | ||
value: ${{ steps.parse.outputs.json }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install dependencies | ||
shell: bash | ||
run: cd ${{ github.action_path }} && npm ci --only=production | ||
|
||
- name: Run parser | ||
id: parse | ||
shell: bash | ||
env: | ||
INPUT_CONTENT: ${{ inputs.content }} | ||
INPUT_FIELDS: ${{ inputs.fields }} | ||
run: node ${{ github.action_path }}/parse.js |
Oops, something went wrong.