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

Fix/release v0.6.10 #30

Merged
merged 3 commits into from
Sep 24, 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
30 changes: 17 additions & 13 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,29 +70,20 @@ jobs:

# region Compiling

- name: Install rpm tools
if: matrix.platform == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends rpm

- name: Install mingw toolchain
if: matrix.platform == 'windows'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends mingw-w64

- name: Rustup Self Update
if: matrix.platform != 'macos'
shell: bash
run: |
rustup self update

- name: Update Rust toolchain from channel ${{ matrix.channel }}
shell: bash
run: |
rustup update ${{ matrix.channel }}
rustup default ${{ matrix.channel }}

- name: Check Rust ${{ matrix.channel }} toolchain versions
shell: bash
run: |
rustup --version
cargo --version
Expand All @@ -101,19 +92,25 @@ jobs:

- name: Install cargo plugins
if: matrix.platform == 'linux'
shell: bash
run: cargo install cargo-deb cargo-generate-rpm

# endregion

# region Compiling

- name: Create local artifact folders
run: mkdir -p ${{ env.ARTIFACT_DIR }} target/assets
shell: bash
run: |
mkdir -p ${{ env.ARTIFACT_DIR }}
mkdir -p target/assets

- name: Generate Assets
shell: bash
run: cargo run -- generate --all --output-dir target/assets

- name: Compiling the application for further packaging
shell: bash
run: cargo build --release

# endregion
Expand All @@ -122,20 +119,24 @@ jobs:

- name: Make a tar package for release (linux and macos)
if: matrix.platform == 'linux' || matrix.platform == 'macos'
shell: bash
run: tar --directory=${{ env.TARGET_DIR }} -czvf ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.tar.gz solrcopy

- name: Make a Windows zip package
if: matrix.platform == 'windows'
shell: bash
run: |
ls -lshFGHL ${{ env.TARGET_DIR }}
zip -j ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.zip ${{ env.TARGET_DIR }}/solrcopy.exe

- name: Make the debian package
if: matrix.platform == 'linux'
shell: bash
run: cargo deb --profile release --verbose --no-build --output ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.deb

- name: Make a rpm package
if: matrix.platform == 'linux'
shell: bash
run: cargo generate-rpm --profile release --output ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.rpm

# endregion
Expand All @@ -148,6 +149,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
shell: bash
run: |
gh release upload --clobber ${{ env.RELEASE_VERSION }} ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.rpm
gh release upload --clobber ${{ env.RELEASE_VERSION }} ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.deb
Expand All @@ -159,11 +161,13 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
shell: bash
run: |
gh release upload --clobber ${{ env.RELEASE_VERSION }} ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.tar.gz

- name: Upload Windows Zip package
if: matrix.platform == 'windows'
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/build-test-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,19 @@ jobs:

- name: Rustup Self Update
if: matrix.os != 'macos-latest'
shell: bash
run: |
rustup self update

- name: Update Rust toolchain from channel ${{ matrix.channel }}
shell: bash
run: |
rustup update ${{ matrix.channel }}
rustup default ${{ matrix.channel }}
rustup component add llvm-tools

- name: Check Rust ${{ matrix.channel }} toolchain versions
shell: bash
run: |
printf '# Rust Information\n\n' >> "${GITHUB_STEP_SUMMARY}";

Expand All @@ -94,6 +97,7 @@ jobs:
# region Testing

- name: Run cargo check
shell: bash
run: cargo check --all-features

- name: Run Solr for testing
Expand All @@ -104,6 +108,7 @@ jobs:
up-flags: "-d"

- name: Run cargo test
shell: bash
run: cargo test

# endregion
Expand All @@ -113,11 +118,13 @@ jobs:
- name: Run cargo clippy
if: matrix.os == 'ubuntu-latest'
continue-on-error: true # show all errors
shell: bash
run: cargo clippy --all-features

- name: Check source code for future incompatibilities
id: report_future_incompatibilities
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
echo '::group::Checking Future Incompatibilities';

Expand All @@ -143,10 +150,12 @@ jobs:

- name: Run cargo fmt
if: matrix.os == 'ubuntu-latest'
shell: bash
run: cargo fmt --check

- name: Run cargo doc
if: matrix.os == 'ubuntu-latest'
shell: bash
run: cargo doc --no-deps --document-private-items --all-features

# endregion
Expand All @@ -159,6 +168,7 @@ jobs:

- name: Run coverage report
if: matrix.os == 'ubuntu-latest'
shell: bash
run: cargo llvm-cov --all-features --workspace --lcov --no-cfg-coverage-nightly --output-path lcov.info

- name: Coveralls
Expand Down Expand Up @@ -186,13 +196,15 @@ jobs:
ref: ${{ inputs.branch_commit_or_ref || '' }}

- name: Update Rust toolchain from channel ${{ matrix.channel }}
shell: bash
run: |
rustup self update
rustup update ${{ matrix.channel }}
rustup update nightly
rustup default ${{ matrix.channel }}

- name: Check Rust ${{ matrix.channel }} toolchain versions
shell: bash
run: |
rustup --version
cargo --version
Expand All @@ -205,25 +217,31 @@ jobs:
# region Run security audit

- name: Intall cargo-audit from channel ${{ matrix.channel }}
shell: bash
run: cargo install cargo-auditable cargo-audit cargo-udeps

- name: Build with dependency lists embedded in the binaries
shell: bash
run: cargo auditable build --release

- name: Run security audit
shell: bash
run: cargo audit bin target/release/solrcopy

# endregion

# region Checking unused dependencies

- name: Print dependency tree
shell: bash
run: cargo tree --verbose --color never

- name: Intall cargo-udeps from channel ${{ matrix.channel }}
shell: bash
run: cargo install cargo-udeps

- name: Find unused dependencies in Cargo.toml
shell: bash
run: cargo +nightly udeps --release

# endregion
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/security_audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ jobs:
ref: ${{ inputs.branch_commit_or_ref || '' }}

- name: Update Rust toolchain from channel ${{ matrix.channel }}
shell: bash
run: |
rustup self update
rustup update ${{ matrix.channel }}
rustup default ${{ matrix.channel }}

- name: Check Rust ${{ matrix.channel }} toolchain versions
shell: bash
run: |
rustup --version
cargo --version
Expand All @@ -45,12 +47,15 @@ jobs:
# region Run security audit

- name: Intall cargo-audit from channel ${{ matrix.channel }}
shell: bash
run: cargo install cargo-auditable cargo-audit

- name: Build with dependency lists embedded in the binaries
shell: bash
run: cargo auditable build --release

- name: Run security audit
shell: bash
run: cargo audit bin target/release/solrcopy

# endregion
Expand Down
Loading