Some fixes to imports and exports AST (#72) #109
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
name: Performance and size | |
on: | |
push: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
hyperfine: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: brndnmtthws/rust-action-cargo-binstall@v1 | |
with: | |
packages: hyperfine | |
- name: Build Ezno | |
run: cargo build --release | |
env: | |
CARGO_PROFILE_RELEASE_DEBUG: true | |
- name: Run parser (and stringer) performance | |
run: | | |
curl https://esm.sh/v128/react-dom@18.2.0/es2022/react-dom.mjs > react.js | |
echo "### Hyperfine">> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`shell">> $GITHUB_STEP_SUMMARY | |
hyperfine './target/release/ezno ast-explorer --file react.js uglifier' >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
- name: Run checker performance | |
run: | | |
curl -O https://gist.githubusercontent.com/kaleidawave/5dcb9ec03deef1161ebf0c9d6e4b88d8/raw/26c26e908a7c6b79a2e93627f1fefa7ffccbd389/demo.ts > demo.ts | |
echo "### Output">> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`shell">> $GITHUB_STEP_SUMMARY | |
./target/release/ezno check demo.ts >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
echo "### Hyperfine">> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`shell">> $GITHUB_STEP_SUMMARY | |
hyperfine './target/release/ezno check demo.ts' >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
- name: Print (linux) binary size | |
run: | | |
echo "Binary is $(stat -c %s ./target/release/ezno) bytes" >> $GITHUB_STEP_SUMMARY |