Skip to content

Commit

Permalink
Merge branch 'main' into windows-self-rename
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkna authored Oct 18, 2024
2 parents 77e3f30 + 2c2569c commit f8ca0a0
Show file tree
Hide file tree
Showing 46 changed files with 2,032 additions and 671 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/check_i18n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
pull_request:
push:
branches:
- main

name: Check i18n

jobs:
check_locale:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install checker
# Build it with the dev profile as this is faster and the checker still works
run: |
cargo install --git https://github.com/topgrade-rs/topgrade_i18n_locale_checker --profile dev
- name: Run the checker
run: topgrade_i18n_locale_checker --locale-file ./locales/app.yml --rust-src-to-check ./src
13 changes: 0 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
name: CI

env:
RUST_VER: 'stable'
CROSS_VER: '0.2.5'
CARGO_NET_RETRY: 3

Expand All @@ -19,12 +18,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: '${{ env.RUST_VER }}'
components: rustfmt

- name: Run cargo fmt
env:
TERM: xterm-256color
Expand Down Expand Up @@ -73,12 +66,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: '${{ env.RUST_VER }}'
components: clippy

- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
with:
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/create_release_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install cargo-deb
run: cargo install cargo-deb
if: ${{ matrix.platform == 'ubuntu-latest' }}
shell: bash

- name: Check format
run: cargo fmt --all -- --check
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Rename Release (Unix)
run: |
cargo install default-target
mkdir assets
mkdir -p assets
FILENAME=topgrade-${{github.event.release.tag_name}}-$(default-target)
mv target/release/topgrade assets
cd assets
Expand All @@ -51,6 +51,24 @@ jobs:
if: ${{ matrix.platform != 'windows-latest' }}
shell: bash

- name: Build Debian-based system binary and create package
# First remove the binary built by previous steps
# because we don't want the auto-update feature,
# then build the new binary without auto-updating.
run: |
rm -rf target/release
cargo build --release
cargo deb --no-build --no-strip
if: ${{ matrix.platform == 'ubuntu-latest' }}
shell: bash

- name: Move Debian-based system package
run: |
mkdir -p assets
mv target/debian/*.deb assets
if: ${{ matrix.platform == 'ubuntu-latest' }}
shell: bash

- name: Rename Release (Windows)
run: |
cargo install default-target
Expand Down
33 changes: 28 additions & 5 deletions .github/workflows/create_release_assets_cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install cargo-deb cross compilation dependencies
run: sudo apt-get install libc6-arm64-cross libgcc-s1-arm64-cross
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
shell: bash

- name: Install cargo-deb
run: cargo install cargo-deb
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
shell: bash

- name: install targets
run: rustup target add ${{ matrix.target }}
Expand All @@ -54,14 +59,32 @@ jobs:

- name: Rename Release
run: |
mkdir assets
mkdir -p assets
FILENAME=topgrade-${{github.event.release.tag_name}}-${{matrix.target}}
mv target/${{matrix.target}}/release/topgrade assets
cd assets
tar --format=ustar -czf $FILENAME.tar.gz topgrade
rm topgrade
ls .
- name: Build Debian-based system package without autoupdate feature
# First remove the binary built by previous steps
# because we don't want the auto-update feature,
# then build the new binary without auto-updating.
run: |
rm -rf target/${{matrix.target}}
cross build --release --target ${{matrix.target}}
cargo deb --target=${{matrix.target}} --no-build --no-strip
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
shell: bash

- name: Move Debian-based system package
run: |
mkdir -p assets
mv target/${{matrix.target}}/debian/*.deb assets
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
shell: bash

- name: Release
uses: softprops/action-gh-release@v2
with:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/release_to_aur.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,19 @@ jobs:
aur-publish:
runs-on: ubuntu-latest
steps:
- name: Publish AUR package
- name: Publish source AUR package
uses: aksh1618/[email protected]
with:
tag_version_prefix: v
package_name: topgrade
commit_username: "Thomas Schönauer"
commit_email: [email protected]
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
- name: Publish binary AUR package
uses: aksh1618/[email protected]
with:
tag_version_prefix: v
package_name: topgrade-bin
commit_username: "Thomas Schönauer"
commit_email: [email protected]
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
10 changes: 5 additions & 5 deletions .github/workflows/release_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
Expand All @@ -42,7 +42,7 @@ jobs:
args: --release --out dist
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
Expand All @@ -61,7 +61,7 @@ jobs:
args: --release --out dist
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
Expand All @@ -76,7 +76,7 @@ jobs:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
Expand All @@ -87,7 +87,7 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v3
with:
name: wheels
- name: Publish to PyPI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_to_winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
publish:
runs-on: windows-latest
steps:
- uses: vedantmgoyal2009/winget-releaser@v2
- uses: vedantmgoyal2009/winget-releaser@main
with:
identifier: topgrade-rs.topgrade
max-versions-to-keep: 5 # keep only latest 5 versions
Expand Down
13 changes: 5 additions & 8 deletions BREAKINGCHANGES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Git: Pull Repos
# Containers step

1. The output of "Pulling <repository path>" has been moved behind the
--verbose flag / [misc] configuration block.

# Configuration

1. The `enable_winget` configuration entry in the `windows` section has been
removed because it will not cause any issues and will be enabled by default.
* New default behavior: In the previous versions, if you have both Docker and
Podman installed, Podman will be used by Topgrade. Now the default option
has been changed to Docker. This can be overridden by setting the
`containers.runtime` option in the configuration TOML to "podman".
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ To add a new `step` to `topgrade`:

// Invoke the new step to get things updated!
ctx.run_type()
.execute("xxx")
.execute(xxx)
.arg(/* args required by this step */)
.status_checked()
}
Expand Down
Loading

0 comments on commit f8ca0a0

Please sign in to comment.