Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 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
111 changes: 108 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,27 @@ jobs:
- uses: actions/checkout@v2
- name: Load the default Rust toolchain via the rust-toolchain file.
run: rustup show

- name: Get cargo-make version
id: cargo-make-version
run: |
echo "::set-output name=hash::$(cargo search cargo-make | grep '^cargo-make =' | md5sum)"
shell: bash
- name: Attempt to load cached cargo-make
uses: actions/cache@v2
id: cargo-make-cache
with:
path: |
~/.cargo/bin/cargo-make
~/.cargo/bin/cargo-make.exe
key: ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
- name: Install cargo-make
if: steps.cargo-make-cache.outputs.cache-hit != 'true'
uses: actions-rs/[email protected]
with:
crate: cargo-make
version: latest

- name: Check
uses: actions-rs/[email protected]
with:
Expand All @@ -51,11 +67,27 @@ jobs:
- uses: actions/checkout@v2
- name: Load the default Rust toolchain via the rust-toolchain file.
run: rustup show

- name: Get cargo-make version
id: cargo-make-version
run: |
echo "::set-output name=hash::$(cargo search cargo-make | grep '^cargo-make =' | md5sum)"
shell: bash
- name: Attempt to load cached cargo-make
uses: actions/cache@v2
id: cargo-make-cache
with:
path: |
~/.cargo/bin/cargo-make
~/.cargo/bin/cargo-make.exe
key: ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
- name: Install cargo-make
if: steps.cargo-make-cache.outputs.cache-hit != 'true'
uses: actions-rs/[email protected]
with:
crate: cargo-make
version: latest

- name: Build
uses: actions-rs/[email protected]
with:
Expand All @@ -81,11 +113,27 @@ jobs:
with:
command: install
args: cargo-all-features --version "^1.4"

- name: Get cargo-make version
id: cargo-make-version
run: |
echo "::set-output name=hash::$(cargo search cargo-make | grep '^cargo-make =' | md5sum)"
shell: bash
- name: Attempt to load cached cargo-make
uses: actions/cache@v2
id: cargo-make-cache
with:
path: |
~/.cargo/bin/cargo-make
~/.cargo/bin/cargo-make.exe
key: ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
- name: Install cargo-make
if: steps.cargo-make-cache.outputs.cache-hit != 'true'
uses: actions-rs/[email protected]
with:
crate: cargo-make
version: latest

- name: Build All Feature Permutations
uses: actions-rs/[email protected]
with:
Expand All @@ -107,11 +155,27 @@ jobs:
run: |
sudo apt-get install wabt binaryen
cargo install twiggy

- name: Get cargo-make version
id: cargo-make-version
run: |
echo "::set-output name=hash::$(cargo search cargo-make | grep '^cargo-make =' | md5sum)"
shell: bash
- name: Attempt to load cached cargo-make
uses: actions/cache@v2
id: cargo-make-cache
with:
path: |
~/.cargo/bin/cargo-make
~/.cargo/bin/cargo-make.exe
key: ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
- name: Install cargo-make
if: steps.cargo-make-cache.outputs.cache-hit != 'true'
uses: actions-rs/[email protected]
with:
crate: cargo-make
version: latest

- name: Build
uses: actions-rs/[email protected]
with:
Expand Down Expand Up @@ -139,12 +203,28 @@ jobs:
- name: Install rustfmt
run: rustup component add rustfmt


- name: Get cargo-make version
id: cargo-make-version
run: |
echo "::set-output name=hash::$(cargo search cargo-make | grep '^cargo-make =' | md5sum)"
shell: bash
- name: Attempt to load cached cargo-make
uses: actions/cache@v2
id: cargo-make-cache
with:
path: |
~/.cargo/bin/cargo-make
~/.cargo/bin/cargo-make.exe
key: ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
- name: Install cargo-make
if: steps.cargo-make-cache.outputs.cache-hit != 'true'
uses: actions-rs/[email protected]
with:
crate: cargo-make
version: latest


- name: Check Format
uses: actions-rs/[email protected]
with:
Expand All @@ -161,16 +241,41 @@ jobs:
- name: Load the default Rust toolchain via the rust-toolchain file.
run: rustup show

- name: Install rustfmt
run: rustup component add rustfmt

- name: Get cargo-make version
id: cargo-make-version
run: |
echo "::set-output name=hash::$(cargo search cargo-make | grep '^cargo-make =' | md5sum)"
shell: bash
- name: Attempt to load cached cargo-make
uses: actions/cache@v2
id: cargo-make-cache
with:
path: |
~/.cargo/bin/cargo-make
~/.cargo/bin/cargo-make.exe
key: ${{ runner.os }}-${{ steps.cargo-make-version.outputs.hash }}
- name: Install cargo-make
if: steps.cargo-make-cache.outputs.cache-hit != 'true'
uses: actions-rs/[email protected]
with:
crate: cargo-make
version: latest

- name: Get cargo-readme version
id: cargo-readme-version
run: |
echo "::set-output name=hash::$(cargo search cargo-readme | grep '^cargo-readme =' | md5sum)"
shell: bash
- name: Attempt to load cached cargo-readme
uses: actions/cache@v2
id: cargo-readme-cache
with:
path: |
~/.cargo/bin/cargo-readme
~/.cargo/bin/cargo-readme.exe
key: ${{ runner.os }}-${{ steps.cargo-readme-version.outputs.hash }}
- name: Install cargo-readme
if: steps.cargo-readme-cache.outputs.cache-hit != 'true'
uses: actions-rs/[email protected]
with:
crate: cargo-readme
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Each commit and pull request should follow the [style guide][style_guide] and be

Handy commands (run from the root directory):

- `cargo tidy` runs tidy-checks (not including fmt/clippy)
- `cargo tidy` runs tidy-checks (license, fmt, readmes)
- `cargo quick` runs the fastest tests and lints.
- `cargo make ci-all` runs all tests and lints

Expand Down
12 changes: 10 additions & 2 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@ dependencies = [
"test-all-features",
"fmt-check",
"clippy-all",
"tidy",
"tidy-minus-fmt",
"test-ffi",
]

[tasks.tidy]
description = "Run fmt and other tidy checks"
category = "ICU4X Development"
dependencies = [
"fmt",
"tidy-minus-fmt",
]

[tasks.ci-job-check]
description = "Run all tests for the CI 'check' job"
category = "ICU4X Development"
Expand Down Expand Up @@ -56,7 +64,7 @@ dependencies = [
description = "Run all tests for the CI 'tidy' job"
category = "CI"
dependencies = [
"tidy",
"tidy-minus-fmt",
]

[tasks.ci-job-wasm]
Expand Down
12 changes: 7 additions & 5 deletions tools/scripts/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,23 @@ dependencies = [
[tasks.test-capi]
description = "Run C API tests"
category = "ICU4X Development"
script_runner = "@duckscript"
script = '''
cd ffi/capi/examples/pluralrules;
make
exec make
cd ../fixeddecimal;
make
exec make
cd ../locale;
make
exec make
'''

[tasks.test-cpp]
description = "Run CPP tests"
category = "ICU4X Development"
script_runner = "@duckscript"
script = '''
cd ffi/cpp/examples/pluralrules;
make
exec make
cd ../fixeddecimal;
make
exec make
'''
2 changes: 1 addition & 1 deletion tools/scripts/tidy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# This is a cargo-make file included in the toplevel Makefile.toml

[tasks.tidy]
[tasks.tidy-minus-fmt]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion (optional): Delete the "tidy-minus-fmt" task, move these up into "ci-job-tidy", and make "tidy" invoke fmt + ci-job-tidy.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda want the ci-job-foo to be toplevel so you can change CI jobs without changing other stuff.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eh, fixed it anyway

description = "Run miscellaneous tidy checks"
category = "ICU4X Development"
dependencies = [
Expand Down
8 changes: 4 additions & 4 deletions tools/scripts/wasm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ dependencies = [
"wasm-wasm-release",
"wasm-wat",
"wasm-dcmp",
"opt",
"wasm-twiggy-dowasm-minators",
"wasm-opt",
"wasm-twiggy-dominators",
]

[tasks.wasm-test-release]
Expand All @@ -220,8 +220,8 @@ category = "ICU4X WASM"
script_runner = "@duckscript"
script = '''
cd ./ffi/wasm/test;
npm install;
npm test;
exec npm install;
exec npm test;
'''
dependencies = ["wasm-release"]

Expand Down