mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 01:18:21 +00:00
fix cargo wix install (#2644)
This commit is contained in:
parent
7065812c8d
commit
a2e86c2ea3
2 changed files with 198 additions and 198 deletions
392
.github/workflows/ci.yml
vendored
392
.github/workflows/ci.yml
vendored
|
|
@ -2,11 +2,11 @@ name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 2 * * *'
|
- cron: "0 2 * * *"
|
||||||
push:
|
push:
|
||||||
branches: [ '*' ]
|
branches: ["*"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
@ -17,287 +17,287 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
rust: [nightly, stable, '1.81']
|
rust: [nightly, stable, "1.81"]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore cargo cache
|
- name: Restore cargo cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: ci
|
cache-name: ci
|
||||||
with:
|
with:
|
||||||
shared-key: ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }}
|
shared-key: ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }}
|
||||||
|
|
||||||
- name: MacOS Workaround
|
- name: MacOS Workaround
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest'
|
||||||
run: cargo clean -p serde_derive -p thiserror
|
run: cargo clean -p serde_derive -p thiserror
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@master
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
components: clippy
|
components: clippy
|
||||||
|
|
||||||
- name: Override rust toolchain
|
- name: Override rust toolchain
|
||||||
run: rustup override set ${{ matrix.rust }}
|
run: rustup override set ${{ matrix.rust }}
|
||||||
|
|
||||||
- name: Rustup Show
|
- name: Rustup Show
|
||||||
run: rustup show
|
run: rustup show
|
||||||
|
|
||||||
- name: Build Debug
|
- name: Build Debug
|
||||||
run: |
|
run: |
|
||||||
cargo build
|
cargo build
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: make test
|
run: make test
|
||||||
|
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
run: |
|
run: |
|
||||||
make clippy
|
make clippy
|
||||||
|
|
||||||
- name: Build Release
|
- name: Build Release
|
||||||
run: make build-release
|
run: make build-release
|
||||||
|
|
||||||
- name: Test Install
|
- name: Test Install
|
||||||
run: cargo install --path "." --force --locked
|
run: cargo install --path "." --force --locked
|
||||||
|
|
||||||
- name: Binary Size (unix)
|
- name: Binary Size (unix)
|
||||||
if: matrix.os != 'windows-latest'
|
if: matrix.os != 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
ls -l ./target/release/gitui
|
ls -l ./target/release/gitui
|
||||||
|
|
||||||
- name: Binary Size (win)
|
- name: Binary Size (win)
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
ls -l ./target/release/gitui.exe
|
ls -l ./target/release/gitui.exe
|
||||||
|
|
||||||
- name: Binary dependencies (mac)
|
- name: Binary dependencies (mac)
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest'
|
||||||
run: |
|
run: |
|
||||||
otool -L ./target/release/gitui
|
otool -L ./target/release/gitui
|
||||||
|
|
||||||
- name: Build MSI (windows)
|
- name: Build MSI (windows)
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-wix --version 0.3.3
|
cargo install cargo-wix --version 0.3.3 --locked
|
||||||
cargo wix --version
|
cargo wix --version
|
||||||
cargo wix -p gitui --no-build --nocapture --output ./target/wix/gitui-win.msi
|
cargo wix -p gitui --no-build --nocapture --output ./target/wix/gitui-win.msi
|
||||||
ls -l ./target/wix/gitui-win.msi
|
ls -l ./target/wix/gitui-win.msi
|
||||||
|
|
||||||
build-linux-musl:
|
build-linux-musl:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
rust: [nightly, stable, '1.81']
|
rust: [nightly, stable, "1.81"]
|
||||||
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore cargo cache
|
- name: Restore cargo cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: ci
|
cache-name: ci
|
||||||
with:
|
with:
|
||||||
key: ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }}
|
key: ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }}
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@master
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
targets: x86_64-unknown-linux-musl
|
targets: x86_64-unknown-linux-musl
|
||||||
|
|
||||||
# The build would fail without manually installing the target.
|
# The build would fail without manually installing the target.
|
||||||
# https://github.com/dtolnay/rust-toolchain/issues/83
|
# https://github.com/dtolnay/rust-toolchain/issues/83
|
||||||
- name: Manually install target
|
- name: Manually install target
|
||||||
run: rustup target add x86_64-unknown-linux-musl
|
run: rustup target add x86_64-unknown-linux-musl
|
||||||
|
|
||||||
- name: Override rust toolchain
|
- name: Override rust toolchain
|
||||||
run: rustup override set ${{ matrix.rust }}
|
run: rustup override set ${{ matrix.rust }}
|
||||||
|
|
||||||
- name: Rustup Show
|
- name: Rustup Show
|
||||||
run: rustup show
|
run: rustup show
|
||||||
|
|
||||||
- name: Setup MUSL
|
- name: Setup MUSL
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -qq install musl-tools
|
sudo apt-get -qq install musl-tools
|
||||||
- name: Build Debug
|
- name: Build Debug
|
||||||
run: |
|
run: |
|
||||||
make build-linux-musl-debug
|
make build-linux-musl-debug
|
||||||
./target/x86_64-unknown-linux-musl/debug/gitui --version
|
./target/x86_64-unknown-linux-musl/debug/gitui --version
|
||||||
- name: Build Release
|
- name: Build Release
|
||||||
run: |
|
run: |
|
||||||
make build-linux-musl-release
|
make build-linux-musl-release
|
||||||
./target/x86_64-unknown-linux-musl/release/gitui --version
|
./target/x86_64-unknown-linux-musl/release/gitui --version
|
||||||
ls -l ./target/x86_64-unknown-linux-musl/release/gitui
|
ls -l ./target/x86_64-unknown-linux-musl/release/gitui
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
make test-linux-musl
|
make test-linux-musl
|
||||||
- name: Test Install
|
- name: Test Install
|
||||||
run: cargo install --path "." --force --locked
|
run: cargo install --path "." --force --locked
|
||||||
|
|
||||||
build-linux-arm:
|
build-linux-arm:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
rust: [nightly, stable, '1.81']
|
rust: [nightly, stable, "1.81"]
|
||||||
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore cargo cache
|
- name: Restore cargo cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: ci
|
cache-name: ci
|
||||||
with:
|
with:
|
||||||
key: ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }}
|
key: ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }}
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@master
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
|
|
||||||
- name: Override rust toolchain
|
- name: Override rust toolchain
|
||||||
run: rustup override set ${{ matrix.rust }}
|
run: rustup override set ${{ matrix.rust }}
|
||||||
|
|
||||||
- name: Setup ARM toolchain
|
- name: Setup ARM toolchain
|
||||||
run: |
|
run: |
|
||||||
rustup target add aarch64-unknown-linux-gnu
|
rustup target add aarch64-unknown-linux-gnu
|
||||||
rustup target add armv7-unknown-linux-gnueabihf
|
rustup target add armv7-unknown-linux-gnueabihf
|
||||||
rustup target add arm-unknown-linux-gnueabihf
|
rustup target add arm-unknown-linux-gnueabihf
|
||||||
|
|
||||||
curl -o $GITHUB_WORKSPACE/aarch64.tar.xz https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/8.2-2018.08/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu.tar.xz
|
curl -o $GITHUB_WORKSPACE/aarch64.tar.xz https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/8.2-2018.08/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu.tar.xz
|
||||||
curl -o $GITHUB_WORKSPACE/arm.tar.xz https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/8.2-2018.08/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf.tar.xz
|
curl -o $GITHUB_WORKSPACE/arm.tar.xz https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/8.2-2018.08/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf.tar.xz
|
||||||
|
|
||||||
tar xf $GITHUB_WORKSPACE/aarch64.tar.xz
|
tar xf $GITHUB_WORKSPACE/aarch64.tar.xz
|
||||||
tar xf $GITHUB_WORKSPACE/arm.tar.xz
|
tar xf $GITHUB_WORKSPACE/arm.tar.xz
|
||||||
|
|
||||||
echo "$GITHUB_WORKSPACE/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu/bin" >> $GITHUB_PATH
|
echo "$GITHUB_WORKSPACE/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu/bin" >> $GITHUB_PATH
|
||||||
echo "$GITHUB_WORKSPACE/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf/bin" >> $GITHUB_PATH
|
echo "$GITHUB_WORKSPACE/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Rustup Show
|
- name: Rustup Show
|
||||||
run: rustup show
|
run: rustup show
|
||||||
|
|
||||||
- name: Build Debug
|
- name: Build Debug
|
||||||
run: |
|
run: |
|
||||||
make build-linux-arm-debug
|
make build-linux-arm-debug
|
||||||
- name: Build Release
|
- name: Build Release
|
||||||
run: |
|
run: |
|
||||||
make build-linux-arm-release
|
make build-linux-arm-release
|
||||||
ls -l ./target/aarch64-unknown-linux-gnu/release/gitui || ls -l ./target/armv7-unknown-linux-gnueabihf/release/gitui || ls -l ./target/arm-unknown-linux-gnueabihf/release/gitui
|
ls -l ./target/aarch64-unknown-linux-gnu/release/gitui || ls -l ./target/armv7-unknown-linux-gnueabihf/release/gitui || ls -l ./target/arm-unknown-linux-gnueabihf/release/gitui
|
||||||
|
|
||||||
build-apple-x86:
|
build-apple-x86:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
rust: [nightly, stable, '1.81']
|
rust: [nightly, stable, "1.81"]
|
||||||
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore cargo cache
|
- name: Restore cargo cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: ci
|
cache-name: ci
|
||||||
with:
|
with:
|
||||||
key: apple-x86-${{ env.cache-name }}-${{ matrix.rust }}
|
key: apple-x86-${{ env.cache-name }}-${{ matrix.rust }}
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@master
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
|
|
||||||
- name: Override rust toolchain
|
- name: Override rust toolchain
|
||||||
run: rustup override set ${{ matrix.rust }}
|
run: rustup override set ${{ matrix.rust }}
|
||||||
|
|
||||||
- name: Setup target
|
- name: Setup target
|
||||||
run: rustup target add x86_64-apple-darwin
|
run: rustup target add x86_64-apple-darwin
|
||||||
|
|
||||||
- name: Rustup Show
|
- name: Rustup Show
|
||||||
run: rustup show
|
run: rustup show
|
||||||
|
|
||||||
- name: Build Debug
|
- name: Build Debug
|
||||||
run: |
|
run: |
|
||||||
make build-apple-x86-debug
|
make build-apple-x86-debug
|
||||||
- name: Build Release
|
- name: Build Release
|
||||||
run: |
|
run: |
|
||||||
make build-apple-x86-release
|
make build-apple-x86-release
|
||||||
ls -l ./target/x86_64-apple-darwin/release/gitui
|
ls -l ./target/x86_64-apple-darwin/release/gitui
|
||||||
|
|
||||||
linting:
|
linting:
|
||||||
name: Lints
|
name: Lints
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore cargo cache
|
- name: Restore cargo cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: ci
|
cache-name: ci
|
||||||
with:
|
with:
|
||||||
key: ubuntu-latest-${{ env.cache-name }}-stable
|
key: ubuntu-latest-${{ env.cache-name }}-stable
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
|
|
||||||
- run: cargo fmt -- --check
|
- run: cargo fmt -- --check
|
||||||
|
|
||||||
- name: cargo-sort
|
- name: cargo-sort
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-sort --force
|
cargo install cargo-sort --force
|
||||||
cargo sort -c -w
|
cargo sort -c -w
|
||||||
|
|
||||||
- name: cargo-deny install
|
- name: cargo-deny install
|
||||||
run: |
|
run: |
|
||||||
cargo install --locked cargo-deny
|
cargo install --locked cargo-deny
|
||||||
|
|
||||||
- name: cargo-deny checks
|
- name: cargo-deny checks
|
||||||
run: |
|
run: |
|
||||||
cargo deny check
|
cargo deny check
|
||||||
|
|
||||||
udeps:
|
udeps:
|
||||||
name: udeps
|
name: udeps
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore cargo cache
|
- name: Restore cargo cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: ci
|
cache-name: ci
|
||||||
with:
|
with:
|
||||||
key: ubuntu-latest-${{ env.cache-name }}-nightly
|
key: ubuntu-latest-${{ env.cache-name }}-nightly
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@nightly
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
|
|
||||||
- name: build cargo-udeps
|
- name: build cargo-udeps
|
||||||
run: cargo install --git https://github.com/est31/cargo-udeps --locked
|
run: cargo install --git https://github.com/est31/cargo-udeps --locked
|
||||||
|
|
||||||
- name: run cargo-udeps
|
- name: run cargo-udeps
|
||||||
run: cargo +nightly udeps --all-targets
|
run: cargo +nightly udeps --all-targets
|
||||||
|
|
||||||
log-test:
|
log-test:
|
||||||
name: Changelog Test
|
name: Changelog Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Extract release notes
|
- name: Extract release notes
|
||||||
id: extract_release_notes
|
id: extract_release_notes
|
||||||
uses: ffurrer2/extract-release-notes@v2
|
uses: ffurrer2/extract-release-notes@v2
|
||||||
with:
|
with:
|
||||||
release_notes_file: ./release-notes.txt
|
release_notes_file: ./release-notes.txt
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: release-notes.txt
|
name: release-notes.txt
|
||||||
path: ./release-notes.txt
|
path: ./release-notes.txt
|
||||||
|
|
||||||
test-homebrew:
|
test-homebrew:
|
||||||
name: Test Homebrew Formula (macOS)
|
name: Test Homebrew Formula (macOS)
|
||||||
|
|
|
||||||
4
Makefile
4
Makefile
|
|
@ -37,7 +37,7 @@ release-mac-x86: build-apple-x86-release
|
||||||
release-win: build-release
|
release-win: build-release
|
||||||
mkdir -p release
|
mkdir -p release
|
||||||
tar -C ./target/release/ -czvf ./release/gitui-win.tar.gz ./gitui.exe
|
tar -C ./target/release/ -czvf ./release/gitui-win.tar.gz ./gitui.exe
|
||||||
cargo install cargo-wix --version 0.3.3
|
cargo install cargo-wix --version 0.3.3 --locked
|
||||||
cargo wix -p gitui --no-build --nocapture --output ./release/gitui-win.msi
|
cargo wix -p gitui --no-build --nocapture --output ./release/gitui-win.msi
|
||||||
ls -l ./release/gitui-win.msi
|
ls -l ./release/gitui-win.msi
|
||||||
|
|
||||||
|
|
@ -94,7 +94,7 @@ clippy:
|
||||||
clippy-nightly:
|
clippy-nightly:
|
||||||
cargo +nightly clippy --workspace --all-features
|
cargo +nightly clippy --workspace --all-features
|
||||||
|
|
||||||
check: fmt clippy test deny sort
|
check: fmt clippy test sort
|
||||||
|
|
||||||
check-nightly:
|
check-nightly:
|
||||||
cargo +nightly c
|
cargo +nightly c
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue