From 445de429aad065166346b3e3dfa07787d8b48852 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Wed, 17 Dec 2025 17:48:18 -0500 Subject: [PATCH 1/5] try fixing homebrew test --- .github/workflows/ci.yml | 586 +++++++++++++++++++-------------------- 1 file changed, 288 insertions(+), 298 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d31649edd2..b6e6738567 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,315 +12,305 @@ env: CARGO_TERM_COLOR: always jobs: - build: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - rust: [nightly, stable, "1.82"] - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.rust == 'nightly' }} - - steps: - - uses: actions/checkout@v4 - - - name: Restore cargo cache - uses: Swatinem/rust-cache@v2 - env: - cache-name: ci - with: - shared-key: ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }} - - - name: MacOS Workaround - if: matrix.os == 'macos-latest' - run: cargo clean -p serde_derive -p thiserror - - - name: Install Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.rust }} - components: clippy - - - name: Override rust toolchain - run: rustup override set ${{ matrix.rust }} - - - name: Rustup Show - run: rustup show - - - name: Build Debug - run: | - cargo build - - - name: Run tests - run: make test - - - name: Run clippy - run: | - make clippy - - - name: Build Release - run: make build-release - - - name: Test Install - run: cargo install --path "." --force --locked - - - name: Binary Size (unix) - if: matrix.os != 'windows-latest' - run: | - ls -l ./target/release/gitui - - - name: Binary Size (win) - if: matrix.os == 'windows-latest' - run: | - ls -l ./target/release/gitui.exe - - - name: Binary dependencies (mac) - if: matrix.os == 'macos-latest' - run: | - otool -L ./target/release/gitui - - - name: Build MSI (windows) - if: matrix.os == 'windows-latest' - run: | - cargo install cargo-wix --version 0.3.3 --locked - cargo wix --version - cargo wix -p gitui --no-build --nocapture --output ./target/wix/gitui-win.msi - ls -l ./target/wix/gitui-win.msi - - build-linux-musl: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - rust: [nightly, stable, "1.82"] - continue-on-error: ${{ matrix.rust == 'nightly' }} - steps: - - uses: actions/checkout@v4 - - - name: Restore cargo cache - uses: Swatinem/rust-cache@v2 - env: - cache-name: ci - with: - key: ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }} - - - name: Install Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.rust }} - targets: x86_64-unknown-linux-musl - - # The build would fail without manually installing the target. - # https://github.com/dtolnay/rust-toolchain/issues/83 - - name: Manually install target - run: rustup target add x86_64-unknown-linux-musl - - - name: Override rust toolchain - run: rustup override set ${{ matrix.rust }} - - - name: Rustup Show - run: rustup show - - - name: Setup MUSL - run: | - sudo apt-get -qq install musl-tools - - name: Build Debug - run: | - make build-linux-musl-debug - ./target/x86_64-unknown-linux-musl/debug/gitui --version - - name: Build Release - run: | - make build-linux-musl-release - ./target/x86_64-unknown-linux-musl/release/gitui --version - ls -l ./target/x86_64-unknown-linux-musl/release/gitui - - name: Test - run: | - make test-linux-musl - - name: Test Install - run: cargo install --path "." --force --locked - - build-linux-arm: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - rust: [nightly, stable, "1.82"] - continue-on-error: ${{ matrix.rust == 'nightly' }} - steps: - - uses: actions/checkout@v4 - - - name: Restore cargo cache - uses: Swatinem/rust-cache@v2 - env: - cache-name: ci - with: - key: ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }} - - - name: Install Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.rust }} - - - name: Override rust toolchain - run: rustup override set ${{ matrix.rust }} - - - name: Setup ARM toolchain - run: | - rustup target add aarch64-unknown-linux-gnu - rustup target add armv7-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/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/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-arm-linux-gnueabihf/bin" >> $GITHUB_PATH - - - name: Rustup Show - run: rustup show - - - name: Build Debug - run: | - make build-linux-arm-debug - - name: Build Release - run: | - 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 - - build-apple-x86: - runs-on: macos-latest - strategy: - fail-fast: false - matrix: - rust: [nightly, stable, "1.82"] - continue-on-error: ${{ matrix.rust == 'nightly' }} - steps: - - uses: actions/checkout@v4 - - - name: Restore cargo cache - uses: Swatinem/rust-cache@v2 - env: - cache-name: ci - with: - key: apple-x86-${{ env.cache-name }}-${{ matrix.rust }} - - - name: Install Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.rust }} - - - name: Override rust toolchain - run: rustup override set ${{ matrix.rust }} - - - name: Setup target - run: rustup target add x86_64-apple-darwin - - - name: Rustup Show - run: rustup show - - - name: Build Debug - run: | - make build-apple-x86-debug - - name: Build Release - run: | - make build-apple-x86-release - ls -l ./target/x86_64-apple-darwin/release/gitui - - linting: - name: Lints - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Restore cargo cache - uses: Swatinem/rust-cache@v2 - env: - cache-name: ci - with: - key: ubuntu-latest-${{ env.cache-name }}-stable - - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt - - - run: cargo fmt -- --check - - - name: cargo-sort - run: | - cargo install cargo-sort --force - cargo sort -c -w - - - name: cargo-deny install - run: | - cargo install --locked cargo-deny - - - name: cargo-deny checks - run: | - cargo deny check - - udeps: - name: udeps - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Restore cargo cache - uses: Swatinem/rust-cache@v2 - env: - cache-name: ci - with: - key: ubuntu-latest-${{ env.cache-name }}-nightly - - - name: Install Rust - uses: dtolnay/rust-toolchain@nightly - - - name: build cargo-udeps - run: cargo install --git https://github.com/est31/cargo-udeps --locked - - - name: run cargo-udeps - run: cargo +nightly udeps --all-targets - - log-test: - name: Changelog Test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Extract release notes - id: extract_release_notes - uses: ffurrer2/extract-release-notes@v2 - with: - release_notes_file: ./release-notes.txt - - uses: actions/upload-artifact@v4 - with: - name: release-notes.txt - path: ./release-notes.txt + # build: + # strategy: + # fail-fast: false + # matrix: + # os: [ubuntu-latest, macos-latest, windows-latest] + # rust: [nightly, stable, "1.82"] + # runs-on: ${{ matrix.os }} + # continue-on-error: ${{ matrix.rust == 'nightly' }} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Restore cargo cache + # uses: Swatinem/rust-cache@v2 + # env: + # cache-name: ci + # with: + # shared-key: ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }} + + # - name: MacOS Workaround + # if: matrix.os == 'macos-latest' + # run: cargo clean -p serde_derive -p thiserror + + # - name: Install Rust + # uses: dtolnay/rust-toolchain@master + # with: + # toolchain: ${{ matrix.rust }} + # components: clippy + + # - name: Override rust toolchain + # run: rustup override set ${{ matrix.rust }} + + # - name: Rustup Show + # run: rustup show + + # - name: Build Debug + # run: | + # cargo build + + # - name: Run tests + # run: make test + + # - name: Run clippy + # run: | + # make clippy + + # - name: Build Release + # run: make build-release + + # - name: Test Install + # run: cargo install --path "." --force --locked + + # - name: Binary Size (unix) + # if: matrix.os != 'windows-latest' + # run: | + # ls -l ./target/release/gitui + + # - name: Binary Size (win) + # if: matrix.os == 'windows-latest' + # run: | + # ls -l ./target/release/gitui.exe + + # - name: Binary dependencies (mac) + # if: matrix.os == 'macos-latest' + # run: | + # otool -L ./target/release/gitui + + # - name: Build MSI (windows) + # if: matrix.os == 'windows-latest' + # run: | + # cargo install cargo-wix --version 0.3.3 --locked + # cargo wix --version + # cargo wix -p gitui --no-build --nocapture --output ./target/wix/gitui-win.msi + # ls -l ./target/wix/gitui-win.msi + + # build-linux-musl: + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # rust: [nightly, stable, "1.82"] + # continue-on-error: ${{ matrix.rust == 'nightly' }} + # steps: + # - uses: actions/checkout@v4 + + # - name: Restore cargo cache + # uses: Swatinem/rust-cache@v2 + # env: + # cache-name: ci + # with: + # key: ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }} + + # - name: Install Rust + # uses: dtolnay/rust-toolchain@master + # with: + # toolchain: ${{ matrix.rust }} + # targets: x86_64-unknown-linux-musl + + # # The build would fail without manually installing the target. + # # https://github.com/dtolnay/rust-toolchain/issues/83 + # - name: Manually install target + # run: rustup target add x86_64-unknown-linux-musl + + # - name: Override rust toolchain + # run: rustup override set ${{ matrix.rust }} + + # - name: Rustup Show + # run: rustup show + + # - name: Setup MUSL + # run: | + # sudo apt-get -qq install musl-tools + # - name: Build Debug + # run: | + # make build-linux-musl-debug + # ./target/x86_64-unknown-linux-musl/debug/gitui --version + # - name: Build Release + # run: | + # make build-linux-musl-release + # ./target/x86_64-unknown-linux-musl/release/gitui --version + # ls -l ./target/x86_64-unknown-linux-musl/release/gitui + # - name: Test + # run: | + # make test-linux-musl + # - name: Test Install + # run: cargo install --path "." --force --locked + + # build-linux-arm: + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # rust: [nightly, stable, "1.82"] + # continue-on-error: ${{ matrix.rust == 'nightly' }} + # steps: + # - uses: actions/checkout@v4 + + # - name: Restore cargo cache + # uses: Swatinem/rust-cache@v2 + # env: + # cache-name: ci + # with: + # key: ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }} + + # - name: Install Rust + # uses: dtolnay/rust-toolchain@master + # with: + # toolchain: ${{ matrix.rust }} + + # - name: Override rust toolchain + # run: rustup override set ${{ matrix.rust }} + + # - name: Setup ARM toolchain + # run: | + # rustup target add aarch64-unknown-linux-gnu + # rustup target add armv7-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/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/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-arm-linux-gnueabihf/bin" >> $GITHUB_PATH + + # - name: Rustup Show + # run: rustup show + + # - name: Build Debug + # run: | + # make build-linux-arm-debug + # - name: Build Release + # run: | + # 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 + + # build-apple-x86: + # runs-on: macos-latest + # strategy: + # fail-fast: false + # matrix: + # rust: [nightly, stable, "1.82"] + # continue-on-error: ${{ matrix.rust == 'nightly' }} + # steps: + # - uses: actions/checkout@v4 + + # - name: Restore cargo cache + # uses: Swatinem/rust-cache@v2 + # env: + # cache-name: ci + # with: + # key: apple-x86-${{ env.cache-name }}-${{ matrix.rust }} + + # - name: Install Rust + # uses: dtolnay/rust-toolchain@master + # with: + # toolchain: ${{ matrix.rust }} + + # - name: Override rust toolchain + # run: rustup override set ${{ matrix.rust }} + + # - name: Setup target + # run: rustup target add x86_64-apple-darwin + + # - name: Rustup Show + # run: rustup show + + # - name: Build Debug + # run: | + # make build-apple-x86-debug + # - name: Build Release + # run: | + # make build-apple-x86-release + # ls -l ./target/x86_64-apple-darwin/release/gitui + + # linting: + # name: Lints + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + + # - name: Restore cargo cache + # uses: Swatinem/rust-cache@v2 + # env: + # cache-name: ci + # with: + # key: ubuntu-latest-${{ env.cache-name }}-stable + + # - name: Install Rust + # uses: dtolnay/rust-toolchain@stable + # with: + # components: rustfmt + + # - run: cargo fmt -- --check + + # - name: cargo-sort + # run: | + # cargo install cargo-sort --force + # cargo sort -c -w + + # - name: cargo-deny install + # run: | + # cargo install --locked cargo-deny + + # - name: cargo-deny checks + # run: | + # cargo deny check + + # udeps: + # name: udeps + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + + # - name: Restore cargo cache + # uses: Swatinem/rust-cache@v2 + # env: + # cache-name: ci + # with: + # key: ubuntu-latest-${{ env.cache-name }}-nightly + + # - name: Install Rust + # uses: dtolnay/rust-toolchain@nightly + + # - name: build cargo-udeps + # run: cargo install --git https://github.com/est31/cargo-udeps --locked + + # - name: run cargo-udeps + # run: cargo +nightly udeps --all-targets + + # log-test: + # name: Changelog Test + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - name: Extract release notes + # id: extract_release_notes + # uses: ffurrer2/extract-release-notes@v2 + # with: + # release_notes_file: ./release-notes.txt + # - uses: actions/upload-artifact@v4 + # with: + # name: release-notes.txt + # path: ./release-notes.txt test-homebrew: name: Test Homebrew Formula (macOS) runs-on: macos-latest steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master - name: Install stable Rust uses: actions-rs/toolchain@v1 with: toolchain: stable - - name: Install Homebrew - run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - - - name: Set up Homebrew in PATH - run: | - echo "$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" >> $GITHUB_PATH - - - name: Update Homebrew - run: brew update - - name: Let Homebrew build gitui from source run: brew install --head --build-from-source gitui From 244c00e4e2f818e62696482760fa6390fbb07c45 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Wed, 17 Dec 2025 18:52:02 -0500 Subject: [PATCH 2/5] try to fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6e6738567..b300ad6614 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -301,7 +301,7 @@ jobs: test-homebrew: name: Test Homebrew Formula (macOS) - runs-on: macos-latest + runs-on: macos-14 steps: - name: Set up Homebrew uses: Homebrew/actions/setup-homebrew@master From f70ea872fe2a6f3d70518b52e6728ed1d9628b92 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Wed, 17 Dec 2025 19:01:56 -0500 Subject: [PATCH 3/5] try fix --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b300ad6614..f6ee838563 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -301,7 +301,7 @@ jobs: test-homebrew: name: Test Homebrew Formula (macOS) - runs-on: macos-14 + runs-on: macos-latest steps: - name: Set up Homebrew uses: Homebrew/actions/setup-homebrew@master @@ -312,7 +312,7 @@ jobs: toolchain: stable - name: Let Homebrew build gitui from source - run: brew install --head --build-from-source gitui + run: brew install --build-from-source gitui - name: Run Homebrew test run: brew test gitui From 34521511bdc0f06666b69ead96429a7a5c1b0fa8 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Wed, 17 Dec 2025 19:04:36 -0500 Subject: [PATCH 4/5] enable all steps again --- .github/workflows/ci.yml | 572 +++++++++++++++++++-------------------- 1 file changed, 286 insertions(+), 286 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6ee838563..8448e44e3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,292 +12,292 @@ env: CARGO_TERM_COLOR: always jobs: - # build: - # strategy: - # fail-fast: false - # matrix: - # os: [ubuntu-latest, macos-latest, windows-latest] - # rust: [nightly, stable, "1.82"] - # runs-on: ${{ matrix.os }} - # continue-on-error: ${{ matrix.rust == 'nightly' }} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Restore cargo cache - # uses: Swatinem/rust-cache@v2 - # env: - # cache-name: ci - # with: - # shared-key: ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }} - - # - name: MacOS Workaround - # if: matrix.os == 'macos-latest' - # run: cargo clean -p serde_derive -p thiserror - - # - name: Install Rust - # uses: dtolnay/rust-toolchain@master - # with: - # toolchain: ${{ matrix.rust }} - # components: clippy - - # - name: Override rust toolchain - # run: rustup override set ${{ matrix.rust }} - - # - name: Rustup Show - # run: rustup show - - # - name: Build Debug - # run: | - # cargo build - - # - name: Run tests - # run: make test - - # - name: Run clippy - # run: | - # make clippy - - # - name: Build Release - # run: make build-release - - # - name: Test Install - # run: cargo install --path "." --force --locked - - # - name: Binary Size (unix) - # if: matrix.os != 'windows-latest' - # run: | - # ls -l ./target/release/gitui - - # - name: Binary Size (win) - # if: matrix.os == 'windows-latest' - # run: | - # ls -l ./target/release/gitui.exe - - # - name: Binary dependencies (mac) - # if: matrix.os == 'macos-latest' - # run: | - # otool -L ./target/release/gitui - - # - name: Build MSI (windows) - # if: matrix.os == 'windows-latest' - # run: | - # cargo install cargo-wix --version 0.3.3 --locked - # cargo wix --version - # cargo wix -p gitui --no-build --nocapture --output ./target/wix/gitui-win.msi - # ls -l ./target/wix/gitui-win.msi - - # build-linux-musl: - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # rust: [nightly, stable, "1.82"] - # continue-on-error: ${{ matrix.rust == 'nightly' }} - # steps: - # - uses: actions/checkout@v4 - - # - name: Restore cargo cache - # uses: Swatinem/rust-cache@v2 - # env: - # cache-name: ci - # with: - # key: ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }} - - # - name: Install Rust - # uses: dtolnay/rust-toolchain@master - # with: - # toolchain: ${{ matrix.rust }} - # targets: x86_64-unknown-linux-musl - - # # The build would fail without manually installing the target. - # # https://github.com/dtolnay/rust-toolchain/issues/83 - # - name: Manually install target - # run: rustup target add x86_64-unknown-linux-musl - - # - name: Override rust toolchain - # run: rustup override set ${{ matrix.rust }} - - # - name: Rustup Show - # run: rustup show - - # - name: Setup MUSL - # run: | - # sudo apt-get -qq install musl-tools - # - name: Build Debug - # run: | - # make build-linux-musl-debug - # ./target/x86_64-unknown-linux-musl/debug/gitui --version - # - name: Build Release - # run: | - # make build-linux-musl-release - # ./target/x86_64-unknown-linux-musl/release/gitui --version - # ls -l ./target/x86_64-unknown-linux-musl/release/gitui - # - name: Test - # run: | - # make test-linux-musl - # - name: Test Install - # run: cargo install --path "." --force --locked - - # build-linux-arm: - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # rust: [nightly, stable, "1.82"] - # continue-on-error: ${{ matrix.rust == 'nightly' }} - # steps: - # - uses: actions/checkout@v4 - - # - name: Restore cargo cache - # uses: Swatinem/rust-cache@v2 - # env: - # cache-name: ci - # with: - # key: ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }} - - # - name: Install Rust - # uses: dtolnay/rust-toolchain@master - # with: - # toolchain: ${{ matrix.rust }} - - # - name: Override rust toolchain - # run: rustup override set ${{ matrix.rust }} - - # - name: Setup ARM toolchain - # run: | - # rustup target add aarch64-unknown-linux-gnu - # rustup target add armv7-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/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/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-arm-linux-gnueabihf/bin" >> $GITHUB_PATH - - # - name: Rustup Show - # run: rustup show - - # - name: Build Debug - # run: | - # make build-linux-arm-debug - # - name: Build Release - # run: | - # 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 - - # build-apple-x86: - # runs-on: macos-latest - # strategy: - # fail-fast: false - # matrix: - # rust: [nightly, stable, "1.82"] - # continue-on-error: ${{ matrix.rust == 'nightly' }} - # steps: - # - uses: actions/checkout@v4 - - # - name: Restore cargo cache - # uses: Swatinem/rust-cache@v2 - # env: - # cache-name: ci - # with: - # key: apple-x86-${{ env.cache-name }}-${{ matrix.rust }} - - # - name: Install Rust - # uses: dtolnay/rust-toolchain@master - # with: - # toolchain: ${{ matrix.rust }} - - # - name: Override rust toolchain - # run: rustup override set ${{ matrix.rust }} - - # - name: Setup target - # run: rustup target add x86_64-apple-darwin - - # - name: Rustup Show - # run: rustup show - - # - name: Build Debug - # run: | - # make build-apple-x86-debug - # - name: Build Release - # run: | - # make build-apple-x86-release - # ls -l ./target/x86_64-apple-darwin/release/gitui - - # linting: - # name: Lints - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - - # - name: Restore cargo cache - # uses: Swatinem/rust-cache@v2 - # env: - # cache-name: ci - # with: - # key: ubuntu-latest-${{ env.cache-name }}-stable - - # - name: Install Rust - # uses: dtolnay/rust-toolchain@stable - # with: - # components: rustfmt - - # - run: cargo fmt -- --check - - # - name: cargo-sort - # run: | - # cargo install cargo-sort --force - # cargo sort -c -w - - # - name: cargo-deny install - # run: | - # cargo install --locked cargo-deny - - # - name: cargo-deny checks - # run: | - # cargo deny check - - # udeps: - # name: udeps - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - - # - name: Restore cargo cache - # uses: Swatinem/rust-cache@v2 - # env: - # cache-name: ci - # with: - # key: ubuntu-latest-${{ env.cache-name }}-nightly - - # - name: Install Rust - # uses: dtolnay/rust-toolchain@nightly - - # - name: build cargo-udeps - # run: cargo install --git https://github.com/est31/cargo-udeps --locked - - # - name: run cargo-udeps - # run: cargo +nightly udeps --all-targets - - # log-test: - # name: Changelog Test - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # - name: Extract release notes - # id: extract_release_notes - # uses: ffurrer2/extract-release-notes@v2 - # with: - # release_notes_file: ./release-notes.txt - # - uses: actions/upload-artifact@v4 - # with: - # name: release-notes.txt - # path: ./release-notes.txt + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + rust: [nightly, stable, "1.82"] + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.rust == 'nightly' }} + + steps: + - uses: actions/checkout@v4 + + - name: Restore cargo cache + uses: Swatinem/rust-cache@v2 + env: + cache-name: ci + with: + shared-key: ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }} + + - name: MacOS Workaround + if: matrix.os == 'macos-latest' + run: cargo clean -p serde_derive -p thiserror + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} + components: clippy + + - name: Override rust toolchain + run: rustup override set ${{ matrix.rust }} + + - name: Rustup Show + run: rustup show + + - name: Build Debug + run: | + cargo build + + - name: Run tests + run: make test + + - name: Run clippy + run: | + make clippy + + - name: Build Release + run: make build-release + + - name: Test Install + run: cargo install --path "." --force --locked + + - name: Binary Size (unix) + if: matrix.os != 'windows-latest' + run: | + ls -l ./target/release/gitui + + - name: Binary Size (win) + if: matrix.os == 'windows-latest' + run: | + ls -l ./target/release/gitui.exe + + - name: Binary dependencies (mac) + if: matrix.os == 'macos-latest' + run: | + otool -L ./target/release/gitui + + - name: Build MSI (windows) + if: matrix.os == 'windows-latest' + run: | + cargo install cargo-wix --version 0.3.3 --locked + cargo wix --version + cargo wix -p gitui --no-build --nocapture --output ./target/wix/gitui-win.msi + ls -l ./target/wix/gitui-win.msi + + build-linux-musl: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + rust: [nightly, stable, "1.82"] + continue-on-error: ${{ matrix.rust == 'nightly' }} + steps: + - uses: actions/checkout@v4 + + - name: Restore cargo cache + uses: Swatinem/rust-cache@v2 + env: + cache-name: ci + with: + key: ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }} + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} + targets: x86_64-unknown-linux-musl + + # The build would fail without manually installing the target. + # https://github.com/dtolnay/rust-toolchain/issues/83 + - name: Manually install target + run: rustup target add x86_64-unknown-linux-musl + + - name: Override rust toolchain + run: rustup override set ${{ matrix.rust }} + + - name: Rustup Show + run: rustup show + + - name: Setup MUSL + run: | + sudo apt-get -qq install musl-tools + - name: Build Debug + run: | + make build-linux-musl-debug + ./target/x86_64-unknown-linux-musl/debug/gitui --version + - name: Build Release + run: | + make build-linux-musl-release + ./target/x86_64-unknown-linux-musl/release/gitui --version + ls -l ./target/x86_64-unknown-linux-musl/release/gitui + - name: Test + run: | + make test-linux-musl + - name: Test Install + run: cargo install --path "." --force --locked + + build-linux-arm: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + rust: [nightly, stable, "1.82"] + continue-on-error: ${{ matrix.rust == 'nightly' }} + steps: + - uses: actions/checkout@v4 + + - name: Restore cargo cache + uses: Swatinem/rust-cache@v2 + env: + cache-name: ci + with: + key: ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }} + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} + + - name: Override rust toolchain + run: rustup override set ${{ matrix.rust }} + + - name: Setup ARM toolchain + run: | + rustup target add aarch64-unknown-linux-gnu + rustup target add armv7-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/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/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-arm-linux-gnueabihf/bin" >> $GITHUB_PATH + + - name: Rustup Show + run: rustup show + + - name: Build Debug + run: | + make build-linux-arm-debug + - name: Build Release + run: | + 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 + + build-apple-x86: + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + rust: [nightly, stable, "1.82"] + continue-on-error: ${{ matrix.rust == 'nightly' }} + steps: + - uses: actions/checkout@v4 + + - name: Restore cargo cache + uses: Swatinem/rust-cache@v2 + env: + cache-name: ci + with: + key: apple-x86-${{ env.cache-name }}-${{ matrix.rust }} + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} + + - name: Override rust toolchain + run: rustup override set ${{ matrix.rust }} + + - name: Setup target + run: rustup target add x86_64-apple-darwin + + - name: Rustup Show + run: rustup show + + - name: Build Debug + run: | + make build-apple-x86-debug + - name: Build Release + run: | + make build-apple-x86-release + ls -l ./target/x86_64-apple-darwin/release/gitui + + linting: + name: Lints + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Restore cargo cache + uses: Swatinem/rust-cache@v2 + env: + cache-name: ci + with: + key: ubuntu-latest-${{ env.cache-name }}-stable + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + + - run: cargo fmt -- --check + + - name: cargo-sort + run: | + cargo install cargo-sort --force + cargo sort -c -w + + - name: cargo-deny install + run: | + cargo install --locked cargo-deny + + - name: cargo-deny checks + run: | + cargo deny check + + udeps: + name: udeps + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Restore cargo cache + uses: Swatinem/rust-cache@v2 + env: + cache-name: ci + with: + key: ubuntu-latest-${{ env.cache-name }}-nightly + + - name: Install Rust + uses: dtolnay/rust-toolchain@nightly + + - name: build cargo-udeps + run: cargo install --git https://github.com/est31/cargo-udeps --locked + + - name: run cargo-udeps + run: cargo +nightly udeps --all-targets + + log-test: + name: Changelog Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Extract release notes + id: extract_release_notes + uses: ffurrer2/extract-release-notes@v2 + with: + release_notes_file: ./release-notes.txt + - uses: actions/upload-artifact@v4 + with: + name: release-notes.txt + path: ./release-notes.txt test-homebrew: name: Test Homebrew Formula (macOS) From 5186d4aecff96a18e6d0ecca5029a384c894cc18 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Wed, 17 Dec 2025 19:07:29 -0500 Subject: [PATCH 5/5] remove outdated test step --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8448e44e3d..bd5b976915 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -313,6 +313,3 @@ jobs: - name: Let Homebrew build gitui from source run: brew install --build-from-source gitui - - - name: Run Homebrew test - run: brew test gitui