-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zhangli20
committed
Dec 8, 2023
1 parent
c7f1a18
commit df438c4
Showing
12 changed files
with
220 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,9 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
target-branch: master | ||
labels: [auto-dependencies] |
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,27 @@ | ||
# Which issue does this PR close? | ||
|
||
<!-- | ||
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. | ||
--> | ||
|
||
Closes #. | ||
|
||
# Rationale for this change | ||
<!-- | ||
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. | ||
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. | ||
--> | ||
|
||
# What changes are included in this PR? | ||
<!-- | ||
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. | ||
--> | ||
|
||
# Are there any user-facing changes? | ||
<!-- | ||
If there are user-facing changes then we may require documentation to be updated before approving the PR. | ||
--> | ||
|
||
<!-- | ||
If there are any breaking changes to public APIs, please add the `api change` label. | ||
--> |
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,65 @@ | ||
name: Delete old workflow runs | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
days: | ||
description: 'Days-worth of runs to keep for each workflow' | ||
required: true | ||
default: '30' | ||
minimum_runs: | ||
description: 'Minimum runs to keep for each workflow' | ||
required: true | ||
default: '6' | ||
delete_workflow_pattern: | ||
description: 'Name or filename of the workflow (if not set, all workflows are targeted)' | ||
required: false | ||
delete_workflow_by_state_pattern: | ||
description: 'Filter workflows by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually' | ||
required: true | ||
default: "ALL" | ||
type: choice | ||
options: | ||
- "ALL" | ||
- active | ||
- deleted | ||
- disabled_inactivity | ||
- disabled_manually | ||
delete_run_by_conclusion_pattern: | ||
description: 'Remove runs based on conclusion: action_required, cancelled, failure, skipped, success' | ||
required: true | ||
default: "ALL" | ||
type: choice | ||
options: | ||
- "ALL" | ||
- "Unsuccessful: action_required,cancelled,failure,skipped" | ||
- action_required | ||
- cancelled | ||
- failure | ||
- skipped | ||
- success | ||
dry_run: | ||
description: 'Logs simulated changes, no deletions are performed' | ||
required: false | ||
|
||
jobs: | ||
del_runs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: write | ||
steps: | ||
- name: Delete workflow runs | ||
uses: Mattraks/delete-workflow-runs@v2 | ||
with: | ||
token: ${{ github.token }} | ||
repository: ${{ github.repository }} | ||
retain_days: ${{ github.event.inputs.days }} | ||
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }} | ||
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }} | ||
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }} | ||
delete_run_by_conclusion_pattern: >- | ||
${{ | ||
startsWith(github.event.inputs.delete_run_by_conclusion_pattern, 'Unsuccessful:') | ||
&& 'action_required,cancelled,failure,skipped' | ||
|| github.event.inputs.delete_run_by_conclusion_pattern | ||
}} | ||
dry_run: ${{ github.event.inputs.dry_run }} |
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 @@ | ||
name: Enwik8 test | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: ["master"] | ||
|
||
jobs: | ||
enwik8-test: | ||
name: Enwik8 Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
||
- name: Build | ||
run: cargo build --release | ||
|
||
- name: Preparing enwik8 | ||
run: xz -d < test/enwik8.xz >enwik8 | ||
|
||
- name: Test with with enwik8 | ||
run: | | ||
(time gzip < enwik8 >enwik8.gz) 2>&1 | grep -Poi 'real\s+\K[0-9.ms]+' >gzip.enc_time | ||
(time gzip -d < enwik8.gz >enwik8.ungz) 2>&1 | grep -Poi 'real\s+\K[0-9.ms]+' >gzip.dec_time | ||
(time bzip2 < enwik8 >enwik8.bz2) 2>&1 | grep -Poi 'real\s+\K[0-9.ms]+' >bzip2.enc_time | ||
(time bzip2 -d < enwik8.bz2 >enwik8.unbz2) 2>&1 | grep -Poi 'real\s+\K[0-9.ms]+' >bzip2.dec_time | ||
(time xz -6 < enwik8 >enwik8.xz) 2>&1 | grep -Poi 'real\s+\K[0-9.ms]+' >xz.enc_time | ||
(time xz -d < enwik8.xz >enwik8.unxz) 2>&1 | grep -Poi 'real\s+\K[0-9.ms]+' >xz.dec_time | ||
(time target/release/orz encode --silent -l0 < enwik8 >enwik8.orz0) 2>&1 | grep -Poi 'real\s+\K[0-9.ms]+' >orz0.enc_time | ||
(time target/release/orz decode --silent < enwik8.orz0 >enwik8.unorz0) 2>&1 | grep -Poi 'real\s+\K[0-9.ms]+' >orz0.dec_time | ||
(time target/release/orz encode --silent -l1 < enwik8 >enwik8.orz1) 2>&1 | grep -Poi 'real\s+\K[0-9.ms]+' >orz1.enc_time | ||
(time target/release/orz decode --silent < enwik8.orz1 >enwik8.unorz1) 2>&1 | grep -Poi 'real\s+\K[0-9.ms]+' >orz1.dec_time | ||
(time target/release/orz encode --silent -l2 < enwik8 >enwik8.orz2) 2>&1 | grep -Poi 'real\s+\K[0-9.ms]+' >orz2.enc_time | ||
(time target/release/orz decode --silent < enwik8.orz2 >enwik8.unorz2) 2>&1 | grep -Poi 'real\s+\K[0-9.ms]+' >orz2.dec_time | ||
cmp enwik8.unorz0 enwik8 | ||
cmp enwik8.unorz1 enwik8 | ||
cmp enwik8.unorz2 enwik8 | ||
- name: Test result | ||
run: | | ||
echo "" | ||
printf "+---------+------------------+--------------+--------------+\n" | ||
printf "| | %16s | %12s | %12s |\n" "Compressed Size" "Encode time" "Decode time" | ||
printf "|---------+------------------+--------------+--------------|\n" | ||
printf "| gzip | %16s | %12s | %12s |\n" "$(wc -c < enwik8.gz | grep -Poi '\d+')" "$(cat < gzip.enc_time)" "$(cat < gzip.dec_time)" | ||
printf "| bzip2 | %16s | %12s | %12s |\n" "$(wc -c < enwik8.bz2 | grep -Poi '\d+')" "$(cat < bzip2.enc_time)" "$(cat < bzip2.dec_time)" | ||
printf "| orz -l0 | %16s | %12s | %12s |\n" "$(wc -c < enwik8.orz0 | grep -Poi '\d+')" "$(cat < orz0.enc_time)" "$(cat < orz0.dec_time)" | ||
printf "| orz -l1 | %16s | %12s | %12s |\n" "$(wc -c < enwik8.orz1 | grep -Poi '\d+')" "$(cat < orz1.enc_time)" "$(cat < orz1.dec_time)" | ||
printf "| orz -l2 | %16s | %12s | %12s |\n" "$(wc -c < enwik8.orz2 | grep -Poi '\d+')" "$(cat < orz2.enc_time)" "$(cat < orz2.dec_time)" | ||
printf "| xz -6 | %16s | %12s | %12s |\n" "$(wc -c < enwik8.xz | grep -Poi '\d+')" "$(cat < xz.enc_time)" "$(cat < xz.dec_time)" | ||
printf "+---------+------------------+--------------+--------------+\n" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Binary file not shown.
Binary file not shown.