Skip to content

Commit bc6798b

Browse files
authored
feat: convert project from tui-test to shell-use (#60)
* feat: initial shell-use commit Signed-off-by: Chapman Pendery <cpendery@vt.edu> --------- Signed-off-by: Chapman Pendery <cpendery@vt.edu>
1 parent 9be2072 commit bc6798b

95 files changed

Lines changed: 7150 additions & 10039 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[target.x86_64-pc-windows-msvc]
2+
rustflags = ["-C", "target-feature=+crt-static"]
3+
4+
[target.aarch64-pc-windows-msvc]
5+
rustflags = ["-C", "target-feature=+crt-static"]

.eslintrc.cjs

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 19 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,35 @@
11
name: CI
2+
23
on:
34
push:
45
branches: [main]
56
pull_request:
67
branches: [main]
78

89
jobs:
9-
e2e-node:
10+
check:
1011
strategy:
1112
matrix:
12-
version: [16, 18, 20, 22, 24]
13-
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
13+
os: ["macos-latest", "windows-latest", "ubuntu-latest"]
1414
runs-on: ${{ matrix.os }}
1515
steps:
1616
- uses: actions/checkout@v4
17-
with:
18-
fetch-depth: 0
19-
20-
- name: Use Node.js ${{ matrix.version }}.x
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version: ${{ matrix.version }}
24-
25-
- name: Run npm ci
26-
run: npm ci
27-
28-
- name: Run commitlint
29-
if: github.event_name == 'push'
30-
run: npx commitlint --from ${{ github.event.before }} --to ${{ github.event.after }} --verbose
31-
32-
- name: setup macOS shells
33-
if: matrix.os == 'macos-latest'
34-
shell: bash
35-
run: |
36-
brew install fish
37-
brew install zsh
38-
39-
for dir in /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/share/zsh /opt/homebrew/share/zsh /opt/homebrew/share/zsh/site-functions /opt/homebrew/share/fish /opt/homebrew/share/fish/vendor_completions.d; do
40-
[ -d "$dir" ] && sudo chmod g-w "$dir"
41-
done
42-
43-
- name: setup linux shells
44-
if: matrix.os == 'ubuntu-latest'
45-
shell: bash
46-
run: |
47-
sudo apt-add-repository ppa:fish-shell/release-3
48-
sudo apt-get update
49-
sudo apt install fish zsh
50-
51-
sudo chmod -R 755 /usr/share/zsh/vendor-completions
52-
sudo chown -R root:root /usr/share/zsh/vendor-completions
53-
sudo chmod -R 755 /usr/share/zsh
54-
sudo chown -R root:root /usr/share/zsh
55-
56-
- name: setup windows shells
57-
if: matrix.os == 'windows-latest'
58-
shell: pwsh
59-
run: |
60-
python -m pip install 'xonsh[full]'
61-
62-
- name: Run npm run lint
63-
run: npm run lint
6417

65-
- name: Run npm run test:e2e
66-
run: npm run test:e2e
18+
- run: |
19+
rustup toolchain install stable --profile default
20+
rustup default stable
21+
rustup component add clippy rustfmt
6722
68-
e2e-bun:
69-
strategy:
70-
matrix:
71-
os: ["ubuntu-latest", "macos-latest"]
72-
runs-on: ${{ matrix.os }}
73-
steps:
74-
- uses: actions/checkout@v4
23+
- uses: actions/cache@v4
7524
with:
76-
fetch-depth: 0
77-
78-
- name: Setup Bun
79-
uses: oven-sh/setup-bun@v2
80-
81-
- name: Run bun install
82-
run: bun install
83-
84-
- name: setup macOS shells
85-
if: matrix.os == 'macos-latest'
86-
shell: bash
87-
run: |
88-
brew install fish
89-
brew install zsh
90-
91-
for dir in /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/share/zsh /opt/homebrew/share/zsh /opt/homebrew/share/zsh/site-functions /opt/homebrew/share/fish /opt/homebrew/share/fish/vendor_completions.d; do
92-
[ -d "$dir" ] && sudo chmod g-w "$dir"
93-
done
94-
95-
- name: setup linux shells
96-
if: matrix.os == 'ubuntu-latest'
97-
shell: bash
98-
run: |
99-
sudo apt-add-repository ppa:fish-shell/release-3
100-
sudo apt-get update
101-
sudo apt install fish zsh
102-
103-
sudo chmod -R 755 /usr/share/zsh/vendor-completions
104-
sudo chown -R root:root /usr/share/zsh/vendor-completions
105-
sudo chmod -R 755 /usr/share/zsh
106-
sudo chown -R root:root /usr/share/zsh
107-
108-
- name: Run npm run test:e2e
109-
run: bun run test:e2e
25+
path: |
26+
~/.cargo/registry
27+
~/.cargo/git
28+
target
29+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
30+
restore-keys: ${{ runner.os }}-cargo-
31+
32+
- run: cargo fmt --all -- --check
33+
- run: cargo clippy --all-targets --all-features -- -D warnings
34+
- run: cargo build
35+
- run: cargo test

.github/workflows/release.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
include:
16+
- target: x86_64-unknown-linux-gnu
17+
os: ubuntu-latest
18+
- target: aarch64-unknown-linux-gnu
19+
os: ubuntu-latest
20+
- target: x86_64-unknown-linux-musl
21+
os: ubuntu-latest
22+
- target: aarch64-unknown-linux-musl
23+
os: ubuntu-latest
24+
- target: x86_64-apple-darwin
25+
os: macos-latest
26+
- target: aarch64-apple-darwin
27+
os: macos-latest
28+
- target: x86_64-pc-windows-msvc
29+
os: windows-latest
30+
- target: aarch64-pc-windows-msvc
31+
os: windows-latest
32+
runs-on: ${{ matrix.os }}
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- run: |
37+
rustup toolchain install stable --profile default
38+
rustup default stable
39+
rustup target add ${{ matrix.target }}
40+
41+
- if: matrix.target == 'aarch64-unknown-linux-gnu'
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y gcc-aarch64-linux-gnu
45+
46+
- if: matrix.target == 'x86_64-unknown-linux-musl'
47+
run: |
48+
sudo apt-get update
49+
sudo apt-get install -y musl-tools
50+
51+
- if: matrix.target == 'aarch64-unknown-linux-musl'
52+
run: |
53+
sudo apt-get update
54+
sudo apt-get install -y musl-tools gcc-aarch64-linux-gnu
55+
56+
- run: cargo build --release --target ${{ matrix.target }}
57+
env:
58+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
59+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc
60+
RUSTFLAGS: ${{ contains(matrix.target, 'windows-msvc') && '-C target-feature=+crt-static' || '' }}
61+
62+
- if: runner.os != 'Windows'
63+
run: |
64+
cd target/${{ matrix.target }}/release
65+
tar czf ../../../shell-use-${{ matrix.target }}.tar.gz shell-use
66+
cd -
67+
68+
- if: runner.os == 'Windows'
69+
shell: pwsh
70+
run: |
71+
Compress-Archive -Path "target/${{ matrix.target }}/release/shell-use.exe" -DestinationPath "shell-use-${{ matrix.target }}.zip"
72+
73+
- uses: actions/upload-artifact@v4
74+
with:
75+
name: shell-use-${{ matrix.target }}
76+
path: |
77+
shell-use-*.tar.gz
78+
shell-use-*.zip
79+
80+
release:
81+
needs: build
82+
runs-on: ubuntu-latest
83+
steps:
84+
- uses: actions/checkout@v4
85+
86+
- uses: actions/download-artifact@v4
87+
with:
88+
path: artifacts
89+
pattern: shell-use-*
90+
merge-multiple: true
91+
92+
- env:
93+
GH_TOKEN: ${{ github.token }}
94+
run: |
95+
gh release create "${{ github.ref_name }}" \
96+
--generate-notes \
97+
artifacts/*

.gitignore

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
node_modules/
2-
lib/
3-
.tui-test/
4-
*.tgz
5-
t*.md
6-
tui-traces/
1+
/target
2+
*.gif
3+
*.trace
4+
.shell-use/

.prettierrc

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)