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

feat(#168): optimized rultor build #180

Merged
merged 2 commits into from
Oct 1, 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
4 changes: 3 additions & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
with:
just-version: 1.30.1
- name: Build mirror
run: just gen
run: |
just install
just gen
- uses: actions-rs/[email protected]
with:
version: '0.22.0'
Expand Down
6 changes: 4 additions & 2 deletions .rultor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ assets:
install: |
rustup install nightly-x86_64-unknown-linux-gnu
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
just install
sudo npm install @openapitools/[email protected] -g
cargo install cargo-machete
cargo install killport
export RULTOR=true
merge:
script: |
just rultor
Expand All @@ -40,7 +42,7 @@ release:
sed -i -e "s/^version = \"0.0.0\"/version = \"${tag}\"/" server/Cargo.toml
sed -i -e "s/^version = \"0.0.0\"/version = \"${tag}\"/" cli/Cargo.toml
sed -i -e "s/^fakehub-server = { path = \"..\/server\", version = \"0.0.0\" }/fakehub-server = { path = \"..\/server\", version = \"${tag}\" }/" cli/Cargo.toml
just rultor
just gen
sed -i -e "s/^name = \"openapi\"/name = \"github-mirror\"/" github-mirror/Cargo.toml
sed -i -e "s/^version = \".*\"/version = \"${tag}\"/" github-mirror/Cargo.toml
sed -i -e "s/^openapi = { path = \"..\/github-mirror\", version = \"1.1.4\" }/github-mirror = { path = \"..\/github-mirror\", version = \"${tag}\" }/" server/Cargo.toml
Expand Down
11 changes: 3 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
install:
cargo install cargo-machete
cargo install killport
npm install @openapitools/[email protected] -g

# Full build.
full:
Expand All @@ -32,11 +33,8 @@ full:

# Generate code.
gen:
node --version
npm --version
cd github-mirror && \
npm install @openapitools/[email protected] -g && \
openapi-generator-cli generate -i github.yml -g rust -o .
${RULTOR:+sudo} openapi-generator-cli generate -i github.yml -g rust -o .

# Build the project.
build:
Expand All @@ -57,10 +55,7 @@ check:

# Rultor merge script.
rultor:
npm --version
cd github-mirror && \
sudo npm install @openapitools/[email protected] -g && \
sudo openapi-generator-cli generate -i github.yml -g rust -o .
just gen
cargo --color=never test
cargo +nightly fmt --check -- --color=never
cargo machete
Expand Down
Loading