From a69f4a29fdde8f3adaf94335ca812f60f09105a2 Mon Sep 17 00:00:00 2001 From: ityuany <519495771@qq.com> Date: Mon, 29 Jul 2024 16:10:11 +0800 Subject: [PATCH] chore: bump version to 0.0.1-112 --- .github/workflows/cross-platform-next.yml | 172 ------------------ .github/workflows/cross-platform.yml | 152 ++++++++++++---- ...publish-github-release.yml => release.yml} | 2 +- crates/cli/Cargo.toml | 2 +- crates/cli_node/Cargo.toml | 2 +- crates/cli_npm/Cargo.toml | 2 +- crates/cli_npx/Cargo.toml | 2 +- crates/cli_pnpm/Cargo.toml | 2 +- crates/cli_pnpx/Cargo.toml | 2 +- crates/cli_yarn/Cargo.toml | 2 +- crates/dev-tools/Cargo.toml | 2 +- crates/snm_atom/Cargo.toml | 2 +- crates/snm_config/Cargo.toml | 2 +- crates/snm_download_builder/Cargo.toml | 2 +- crates/snm_ni/Cargo.toml | 2 +- crates/snm_node_version/Cargo.toml | 2 +- crates/snm_npmrc/Cargo.toml | 2 +- crates/snm_package_json/Cargo.toml | 2 +- crates/snm_shim/Cargo.toml | 2 +- crates/snm_tarball/Cargo.toml | 2 +- crates/snm_utils/Cargo.toml | 2 +- 21 files changed, 133 insertions(+), 229 deletions(-) delete mode 100644 .github/workflows/cross-platform-next.yml rename .github/workflows/{publish-github-release.yml => release.yml} (99%) diff --git a/.github/workflows/cross-platform-next.yml b/.github/workflows/cross-platform-next.yml deleted file mode 100644 index 2c6858c2..00000000 --- a/.github/workflows/cross-platform-next.yml +++ /dev/null @@ -1,172 +0,0 @@ -name: Cross-platform-next CI - -on: - push: - branches: [dev] - pull_request: - branches: [dev] - -jobs: - unit-testing: - name: Unit testing - strategy: - matrix: - include: - # Linux targets - - os: ubuntu-latest - target: x86_64-unknown-linux-gnu - # Windows targets - - os: windows-latest - target: x86_64-pc-windows-msvc - - os: windows-latest - target: i686-pc-windows-msvc - # macOS targets - - os: macos-14 - target: aarch64-apple-darwin - - os: macos-13 - target: x86_64-apple-darwin - fail-fast: false - runs-on: ${{ matrix.os }} - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - override: true - target: ${{ matrix.target }} - - name: Run tests - run: | - cargo test --workspace --exclude e2e -- --nocapture - env: - RUST_BACKTRACE: full - - - build-release: - name: Build release - needs: unit-testing - strategy: - matrix: - include: - # Linux targets - - os: ubuntu-latest - target: x86_64-unknown-linux-gnu - # Windows targets - - os: windows-latest - target: x86_64-pc-windows-msvc - - os: windows-latest - target: i686-pc-windows-msvc - # macOS targets - - os: macos-14 - target: aarch64-apple-darwin - - os: macos-13 - target: x86_64-apple-darwin - fail-fast: false - runs-on: ${{ matrix.os }} - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - override: true - target: ${{ matrix.target }} - - name: Build binary - uses: actions-rs/cargo@v1 - with: - command: build - args: --verbose --release --target ${{ matrix.target }} - - name: Display binary size - shell: bash - run: | - ls -l target/${{ matrix.target }}/release/* - du -h target/${{ matrix.target }}/release/* - - name: Strip binary (Linux and macOS only) - if: matrix.os != 'windows-latest' - run: | - for file in snm node npm npx pnpm pnpx yarn; do - strip "target/${{ matrix.target }}/release/$file" - done - - name: Create Archive - shell: bash - run: | - mkdir archive - cp LICENSE README.md target/${{ matrix.target }}/release/{node,npm,npx,pnpm,pnpx,snm,yarn} archive/ - tar -czf ${{ matrix.target }}.tar.gz -C archive LICENSE README.md node npm npx pnpm pnpx snm yarn - ls -l - - name: Upload Artifacts tar.gz - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.target }} - path: ${{ matrix.target }}.tar.gz - - e2e-testing: - name: E2E testing - needs: build-release - strategy: - matrix: - include: - # Linux targets - - os: ubuntu-latest - target: x86_64-unknown-linux-gnu - # Windows targets - - os: windows-latest - target: x86_64-pc-windows-msvc - - os: windows-latest - target: i686-pc-windows-msvc - # macOS targets - - os: macos-14 - target: aarch64-apple-darwin - - os: macos-13 - target: x86_64-apple-darwin - fail-fast: false - runs-on: ${{ matrix.os }} - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - override: true - target: ${{ matrix.target }} - - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: ${{ matrix.target }} - path: . - - - name: Tar downloaded files - shell: bash - run: | - tar -xvf ${{ matrix.target }}.tar.gz -C e2e/tests - cd e2e/tests - ls -R - - name: e2e tests - shell: bash - run: | - cargo test --package e2e -- --nocapture - - - # coverage: - # name: Collect test coverage - # runs-on: ubuntu-latest - # env: - # CARGO_TERM_COLOR: always - # steps: - # - uses: actions/checkout@v4 - # - name: Install Rust - # run: rustup update stable - # - name: Install cargo-llvm-cov - # uses: taiki-e/install-action@cargo-llvm-cov - # - name: Generate code coverage - # run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info - # - name: Upload coverage to Codecov - # uses: codecov/codecov-action@v3 - # with: - # token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos - # files: lcov.info - # fail_ci_if_error: true diff --git a/.github/workflows/cross-platform.yml b/.github/workflows/cross-platform.yml index de5ada78..c163ba13 100644 --- a/.github/workflows/cross-platform.yml +++ b/.github/workflows/cross-platform.yml @@ -1,4 +1,4 @@ -name: Cross-platform CI +name: CrossPlatform on: push: @@ -7,90 +7,166 @@ on: branches: [dev] jobs: - build-and-test: + unit-testing: + name: Unit testing strategy: matrix: include: # Linux targets - os: ubuntu-latest target: x86_64-unknown-linux-gnu - # - os: ubuntu-latest - # target: i686-unknown-linux-gnu - # - os: ubuntu-latest - # target: aarch64-unknown-linux-gnu - # Windows targets - os: windows-latest target: x86_64-pc-windows-msvc - os: windows-latest target: i686-pc-windows-msvc - # macOS targets - os: macos-14 target: aarch64-apple-darwin - os: macos-13 target: x86_64-apple-darwin fail-fast: false - runs-on: ${{ matrix.os }} - steps: - name: Checkout code uses: actions/checkout@v3 - - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: nightly profile: minimal override: true target: ${{ matrix.target }} - - name: Run tests run: | - cargo b cargo test --workspace --exclude e2e -- --nocapture env: RUST_BACKTRACE: full + + build-release: + name: Build release + needs: unit-testing + strategy: + matrix: + include: + # Linux targets + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + # Windows targets + # - os: windows-latest + # target: x86_64-pc-windows-msvc + # - os: windows-latest + # target: i686-pc-windows-msvc + # macOS targets + - os: macos-14 + target: aarch64-apple-darwin + - os: macos-13 + target: x86_64-apple-darwin + fail-fast: false + runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + override: true + target: ${{ matrix.target }} - name: Build binary uses: actions-rs/cargo@v1 with: command: build args: --verbose --release --target ${{ matrix.target }} - + - name: Display binary size + shell: bash + run: | + ls -l target/${{ matrix.target }}/release/* + du -h target/${{ matrix.target }}/release/* - name: Strip binary (Linux and macOS only) if: matrix.os != 'windows-latest' run: | for file in snm node npm npx pnpm pnpx yarn; do strip "target/${{ matrix.target }}/release/$file" done - - - name: Move binary to e2e + - name: Create Archive + shell: bash run: | - mkdir -p artifacts - mv target/${{ matrix.target }}/release/* e2e/tests + mkdir archive + cp LICENSE README.md target/${{ matrix.target }}/release/{node,npm,npx,pnpm,pnpx,snm,yarn} archive/ + tar -czf ${{ matrix.target }}.tar.gz -C archive LICENSE README.md node npm npx pnpm pnpx snm yarn + ls -l + - name: Upload Artifacts tar.gz + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.target }} + path: ${{ matrix.target }}.tar.gz + e2e-testing: + name: E2E testing + needs: build-release + strategy: + matrix: + include: + # Linux targets + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + # Windows targets + - os: windows-latest + target: x86_64-pc-windows-msvc + - os: windows-latest + target: i686-pc-windows-msvc + # macOS targets + - os: macos-14 + target: aarch64-apple-darwin + - os: macos-13 + target: x86_64-apple-darwin + fail-fast: false + runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + override: true + target: ${{ matrix.target }} + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: ${{ matrix.target }} + path: . + + - name: Tar downloaded files + shell: bash + run: | + tar -xvf ${{ matrix.target }}.tar.gz -C e2e/tests + cd e2e/tests + ls -R - name: e2e tests + shell: bash run: | cargo test --package e2e -- --nocapture - coverage: - name: Collect test coverage - runs-on: ubuntu-latest - env: - CARGO_TERM_COLOR: always - steps: - - uses: actions/checkout@v4 - - name: Install Rust - run: rustup update stable - - name: Install cargo-llvm-cov - uses: taiki-e/install-action@cargo-llvm-cov - - name: Generate code coverage - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos - files: lcov.info - fail_ci_if_error: true + + # coverage: + # name: Collect test coverage + # runs-on: ubuntu-latest + # env: + # CARGO_TERM_COLOR: always + # steps: + # - uses: actions/checkout@v4 + # - name: Install Rust + # run: rustup update stable + # - name: Install cargo-llvm-cov + # uses: taiki-e/install-action@cargo-llvm-cov + # - name: Generate code coverage + # run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + # - name: Upload coverage to Codecov + # uses: codecov/codecov-action@v3 + # with: + # token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos + # files: lcov.info + # fail_ci_if_error: true diff --git a/.github/workflows/publish-github-release.yml b/.github/workflows/release.yml similarity index 99% rename from .github/workflows/publish-github-release.yml rename to .github/workflows/release.yml index 20e471d5..35c6721c 100644 --- a/.github/workflows/publish-github-release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Publish GitHub release +name: Release on: release: diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 8c3ace12..bad78143 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snm" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" authors = ["ityuany"] diff --git a/crates/cli_node/Cargo.toml b/crates/cli_node/Cargo.toml index ec4a1a29..93334b55 100644 --- a/crates/cli_node/Cargo.toml +++ b/crates/cli_node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cli_node" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/cli_npm/Cargo.toml b/crates/cli_npm/Cargo.toml index c15908ed..d4c36bf6 100644 --- a/crates/cli_npm/Cargo.toml +++ b/crates/cli_npm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cli_npm" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/cli_npx/Cargo.toml b/crates/cli_npx/Cargo.toml index f90cf07e..22ae356c 100644 --- a/crates/cli_npx/Cargo.toml +++ b/crates/cli_npx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cli_npx" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/cli_pnpm/Cargo.toml b/crates/cli_pnpm/Cargo.toml index 9c840302..7b71897b 100644 --- a/crates/cli_pnpm/Cargo.toml +++ b/crates/cli_pnpm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cli_pnpm" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/cli_pnpx/Cargo.toml b/crates/cli_pnpx/Cargo.toml index 30c50d1f..880a46a6 100644 --- a/crates/cli_pnpx/Cargo.toml +++ b/crates/cli_pnpx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cli_pnpx" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/cli_yarn/Cargo.toml b/crates/cli_yarn/Cargo.toml index a38ce47e..cf5f3426 100644 --- a/crates/cli_yarn/Cargo.toml +++ b/crates/cli_yarn/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cli_yarn" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/dev-tools/Cargo.toml b/crates/dev-tools/Cargo.toml index 7465dc92..bb04bddc 100644 --- a/crates/dev-tools/Cargo.toml +++ b/crates/dev-tools/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dev-tools" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/snm_atom/Cargo.toml b/crates/snm_atom/Cargo.toml index 0f894eb0..5e924339 100644 --- a/crates/snm_atom/Cargo.toml +++ b/crates/snm_atom/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snm_atom" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/snm_config/Cargo.toml b/crates/snm_config/Cargo.toml index 20f515b9..98d333c2 100644 --- a/crates/snm_config/Cargo.toml +++ b/crates/snm_config/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snm_config" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/snm_download_builder/Cargo.toml b/crates/snm_download_builder/Cargo.toml index e1b19c9d..494c5e9a 100644 --- a/crates/snm_download_builder/Cargo.toml +++ b/crates/snm_download_builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snm_download_builder" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/snm_ni/Cargo.toml b/crates/snm_ni/Cargo.toml index 1ad560d2..5ab3c70e 100644 --- a/crates/snm_ni/Cargo.toml +++ b/crates/snm_ni/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snm_ni" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/snm_node_version/Cargo.toml b/crates/snm_node_version/Cargo.toml index ef79d6a8..5ff681ac 100644 --- a/crates/snm_node_version/Cargo.toml +++ b/crates/snm_node_version/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snm_node_version" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/snm_npmrc/Cargo.toml b/crates/snm_npmrc/Cargo.toml index f42245a4..56b7cb6a 100644 --- a/crates/snm_npmrc/Cargo.toml +++ b/crates/snm_npmrc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snm_npmrc" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/snm_package_json/Cargo.toml b/crates/snm_package_json/Cargo.toml index 7ad5903e..6644a3da 100644 --- a/crates/snm_package_json/Cargo.toml +++ b/crates/snm_package_json/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snm_package_json" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/snm_shim/Cargo.toml b/crates/snm_shim/Cargo.toml index eea0ab55..b9bf3c0a 100644 --- a/crates/snm_shim/Cargo.toml +++ b/crates/snm_shim/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snm_shim" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/snm_tarball/Cargo.toml b/crates/snm_tarball/Cargo.toml index 539463f6..aacd9616 100644 --- a/crates/snm_tarball/Cargo.toml +++ b/crates/snm_tarball/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snm_tarball" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/snm_utils/Cargo.toml b/crates/snm_utils/Cargo.toml index d4b4a42a..50d97529 100644 --- a/crates/snm_utils/Cargo.toml +++ b/crates/snm_utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snm_utils" -version = "0.0.1-111" +version = "0.0.1-112" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html