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

provide nightly builds #2164

Merged
merged 10 commits into from
Mar 27, 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
8 changes: 4 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ jobs:

- name: Build Release Mac
if: matrix.os == 'macos-latest'
run: make release-mac
run: GITUI_RELEASE=1 make release-mac
- name: Build Release Linux
if: matrix.os == 'ubuntu-latest'
run: make release-linux-musl
run: GITUI_RELEASE=1 make release-linux-musl
- name: Build Release Win
if: matrix.os == 'windows-latest'
run: make release-win
run: GITUI_RELEASE=1 make release-win
- name: Build Release Linux ARM
if: matrix.os == 'ubuntu-22.04'
run: make release-linux-arm
run: GITUI_RELEASE=1 make release-linux-arm

- name: Set SHA
if: matrix.os == 'macos-latest'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
- cron: '0 2 * * *'
push:
branches: [ '*' ]
pull_request:
Expand Down
119 changes: 119 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Build Nightly Releases

on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
AWS_BUCKET_NAME: s3://gitui/nightly/

jobs:
release:
strategy:
fail-fast: false
matrix:
os: [
ubuntu-latest, macos-latest, windows-latest, ubuntu-22.04
]
runs-on: ${{ matrix.os }}

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 }}-stable

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

# ideally we trigger the nightly build/deploy only if the normal nightly CI finished successfully
- name: Run tests
if: matrix.os != 'ubuntu-22.04'
run: make test
- name: Run clippy
if: matrix.os != 'ubuntu-22.04'
run: |
cargo clean
make clippy

- name: Setup MUSL
if: matrix.os == 'ubuntu-latest'
run: |
rustup target add x86_64-unknown-linux-musl
sudo apt-get -qq install musl-tools

- name: Setup ARM toolchain
if: matrix.os == 'ubuntu-22.04'
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: Build Release Mac
if: matrix.os == 'macos-latest'
run: make release-mac
- name: Build Release Linux
if: matrix.os == 'ubuntu-latest'
run: make release-linux-musl
- name: Build Release Win
if: matrix.os == 'windows-latest'
run: make release-win
- name: Build Release Linux ARM
if: matrix.os == 'ubuntu-22.04'
run: make release-linux-arm

- name: Ubuntu 22.04 Upload Artifact
if: matrix.os == 'ubuntu-22.04'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
run: |
aws s3 cp ./release/gitui-linux-armv7.tar.gz $AWS_BUCKET_NAME
aws s3 cp ./release/gitui-linux-arm.tar.gz $AWS_BUCKET_NAME
aws s3 cp ./release/gitui-linux-aarch64.tar.gz $AWS_BUCKET_NAME

- name: Ubuntu Latest Upload Artifact
if: matrix.os == 'ubuntu-latest'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
run: |
aws s3 cp ./release/gitui-linux-x86_64.tar.gz $AWS_BUCKET_NAME

- name: MacOS Upload Artifact
if: matrix.os == 'macos-latest'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
run: |
aws s3 cp ./release/gitui-mac.tar.gz $AWS_BUCKET_NAME

- name: Windows Upload Artifact
if: matrix.os == 'windows-latest'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
run: |
aws s3 cp ./release/gitui.msi $env:AWS_BUCKET_NAME
aws s3 cp ./release/gitui-win.tar.gz $env:AWS_BUCKET_NAME
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased

### Added
* provide nightly builds (see [NIGHTLIES.md](./NIGHTLIES.md)) ([#2083](https://github.com/extrawurst/gitui/issues/2083))
* sign commits using openpgp [[@hendrikmaus](https://github.com/hendrikmaus)] ([#97](https://github.com/extrawurst/gitui/issues/97))

### Changed
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ debug:
RUST_BACKTRACE=true cargo run --features=timing -- ${ARGS}

build-release:
GITUI_RELEASE=1 cargo build --release --locked
cargo build --release --locked

release-mac: build-release
strip target/release/gitui
Expand All @@ -42,7 +42,7 @@ build-linux-musl-debug:
cargo build --target=x86_64-unknown-linux-musl

build-linux-musl-release:
GITUI_RELEASE=1 cargo build --release --target=x86_64-unknown-linux-musl
cargo build --release --target=x86_64-unknown-linux-musl

test-linux-musl:
cargo test --workspace --target=x86_64-unknown-linux-musl
Expand All @@ -64,9 +64,9 @@ build-linux-arm-debug:
cargo build --target=arm-unknown-linux-gnueabihf

build-linux-arm-release:
GITUI_RELEASE=1 cargo build --release --target=aarch64-unknown-linux-gnu
GITUI_RELEASE=1 cargo build --release --target=armv7-unknown-linux-gnueabihf
GITUI_RELEASE=1 cargo build --release --target=arm-unknown-linux-gnueabihf
cargo build --release --target=aarch64-unknown-linux-gnu
cargo build --release --target=armv7-unknown-linux-gnueabihf
cargo build --release --target=arm-unknown-linux-gnueabihf

test:
cargo test --workspace
Expand Down
14 changes: 14 additions & 0 deletions NIGHTLIES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Nightlies

**Use with caution as these binaries are build nightly and might be broken**

When you find problems please report them and always mention the version that you see in the `help popup` or when running `gitui -V`

* [gitui-linux-aarch64.tar.gz](https://gitui.s3.eu-west-1.amazonaws.com/nightly/gitui-linux-aarch64.tar.gz)
* [gitui-linux-arm.tar.gz](https://gitui.s3.eu-west-1.amazonaws.com/nightly/gitui-linux-arm.tar.gz)
* [gitui-linux-armv7.tar.gz](https://gitui.s3.eu-west-1.amazonaws.com/nightly/gitui-linux-armv7.tar.gz)
* [gitui-linux-x86_64.tar.gz](https://gitui.s3.eu-west-1.amazonaws.com/nightly/gitui-linux-x86_64.tar.gz)
* [gitui-mac.tar.gz](https://gitui.s3.eu-west-1.amazonaws.com/nightly/gitui-mac.tar.gz)
* [gitui-win.tar.gz](https://gitui.s3.eu-west-1.amazonaws.com/nightly/gitui-mac.tar.gz)
* [gitui-win.msi](https://gitui.s3.eu-west-1.amazonaws.com/nightly/gitui-mac.tar.gz)

10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ conda install -c conda-forge gitui

Binaries available for:

### Linux
#### Linux

- gitui-linux-x86_64.tar.gz (linux musl statically linked)
- gitui-linux-aarch64.tar.gz (linux on 64 bit arm)
Expand All @@ -203,16 +203,18 @@ Binaries available for:

All contain a single binary file

### macOS
#### macOS

- gitui-mac.tar.gz (intel Mac, uses Rosetta on Apple silicon, single binary)


### Windows
#### Windows

- gitui-win.tar.gz (single 64bit binary)
- gitui-win.msi (64bit Installer package)

### Nightly Builds

see [NIGHTLIES.md](./NIGHTLIES.md)

## 7. <a name="build"></a> Build <small><sup>[Top ▲](#table-of-contents)</sup></small>

Expand Down