Skip to content
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

Fixes to things #102

Merged
merged 8 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: build-artifacts
name: build-artifacts-${{ matrix.os }}
path: artifacts/*
if-no-files-found: error
retention-days: 1
Expand All @@ -96,9 +96,14 @@ jobs:

steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
name: build-artifacts
name: build-artifacts-windows-latest
path: build-artifacts
- uses: actions/download-artifact@v3
with:
name: build-artifacts-ubuntu-latest
path: build-artifacts

- name: Print artifacts
Expand Down
53 changes: 35 additions & 18 deletions .github/workflows/performance-and-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
CARGO_TERM_COLOR: always

jobs:
hyperfine:
run-benchmarks:
runs-on: ubuntu-latest

steps:
Expand All @@ -34,32 +34,49 @@ jobs:

- name: Download files
run: |
curl -O https://gist.githubusercontent.com/kaleidawave/5dcb9ec03deef1161ebf0c9d6e4b88d8/raw/03156048e214af0ceee4005ba8b86f96690dcbb2/demo.ts > demo.ts

curl https://esm.sh/v128/react-dom@18.2.0/es2022/react-dom.mjs > react.js

- name: Run parser, minfier, stringer performance
- name: Run checker performance
shell: bash
run: |
curl https://esm.sh/v128/react-dom@18.2.0/es2022/react-dom.mjs > react.js
# Generate a file which contains everything that Ezno currently implements
cargo run -p ezno-parser --example code_blocks_to_script ./checker/specification/specification.md demo.ts

echo "### Hyperfine">> $GITHUB_STEP_SUMMARY
echo "\`\`\`shell">> $GITHUB_STEP_SUMMARY
hyperfine './target/release/ezno ast-explorer --file react.js uglifier' >> $GITHUB_STEP_SUMMARY
echo "<details>
<summary>Input</summary>

\`\`\`ts
" >> $GITHUB_STEP_SUMMARY
cat demo.ts >> $GITHUB_STEP_SUMMARY
echo "\`\`\`
</details>
" >> $GITHUB_STEP_SUMMARY

# Printing diagnostics, so turn colors off for GH Summary
NO_COLOR=1

echo "<details>
<summary>Diagnostics</summary>

\`\`\`" >> $GITHUB_STEP_SUMMARY
./target/release/ezno check demo.ts --timings &>> $GITHUB_STEP_SUMMARY
echo "\`\`\`
</details>
" >> $GITHUB_STEP_SUMMARY

echo "### Checking
\`\`\`shell" >> $GITHUB_STEP_SUMMARY
hyperfine './target/release/ezno check demo.ts' >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

- name: Run checker performance
- name: Run parser, minfier/stringer performance
shell: bash
if: false
run: |
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
curl https://esm.sh/v128/react-dom@18.2.0/es2022/react-dom.mjs > react.js

echo "### Parsing and writing out minified form of `react-dom`
\`\`\`shell">> $GITHUB_STEP_SUMMARY
hyperfine './target/release/ezno ast-explorer --file react.js uglifier' >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

- name: Print (linux) binary size
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
- uses: brndnmtthws/rust-action-cargo-binstall@v1
if: ${{ github.event.inputs.ezno-version != 'none' }}
with:
packages: wasm-bindgen-cli@0.2.87
packages: wasm-bindgen-cli@0.2.89

- name: Set NPM package version & build
id: set-npm-version
Expand Down Expand Up @@ -140,11 +140,15 @@ jobs:
run: |
git add .
git commit -m "Release: ${{ steps.release.outputs.new-versions-description }}"

git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"

# Create tags
echo '${{ steps.release.outputs.new-versions }}' | jq -r '.[]' | while read -r update; do
git tag "release/$update"
done

git push --tags origin main

- name: Discord
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- uses: brndnmtthws/rust-action-cargo-binstall@v1
if: steps.changes.outputs.src == 'true'
with:
packages: wasm-bindgen-cli@0.2.87
packages: wasm-bindgen-cli@0.2.89
- uses: denoland/setup-deno@v1
if: steps.changes.outputs.src == 'true'
with:
Expand Down
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ If you want to check all the checker tests

```shell
cargo test -p ezno-checker-specification
# Also
cargo test -p ezno-checker-specification -F staging
# and
cargo test -p ezno-checker-specification -F all
```

If you want to test the lexing and parsing in Ezno's parser
Expand All @@ -46,7 +50,7 @@ cargo run -p ezno-parser --example lex path/to/file.ts
### Useful commands

- Check source is valid with `cargo check --workspace`
- Check that code is formatted in accordance with the specification with `cargo fmt --all --check`
- Check that code is formatted in accordance with the configuration with `cargo fmt --all --check`
- Run all tests `cargo test --workspace --verbose`
- Use `cargo clippy -- --allow warnings` to find blocking lints

Expand Down
Loading
Loading