summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorextrawurst <mail@rusticorn.com>2024-04-16 08:25:20 +0200
committerextrawurst <mail@rusticorn.com>2024-04-16 08:25:20 +0200
commit115fd168f5a6fb8b726b8ccee51b05fd722027c8 (patch)
treeaf6716ab93062d876e901e365c5fa73c19f7d4a7 /.github
parent47db649e39d98560ffc6f977f0e33e8ff9088d18 (diff)
parent920c28cfd78b75d84aed7e3fcc543ac821e7afcb (diff)
Merge branch 'master'ratatui-25-update
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/brew.yml2
-rw-r--r--.github/workflows/cd.yml15
-rw-r--r--.github/workflows/ci.yml12
-rw-r--r--.github/workflows/nightly.yml119
4 files changed, 139 insertions, 9 deletions
diff --git a/.github/workflows/brew.yml b/.github/workflows/brew.yml
index 91d2b848..35e863f5 100644
--- a/.github/workflows/brew.yml
+++ b/.github/workflows/brew.yml
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Bump homebrew-core formula
- uses: mislav/bump-homebrew-formula-action@v2
+ uses: mislav/bump-homebrew-formula-action@v3
env:
COMMITTER_TOKEN: ${{ secrets.BREW_TOKEN }}
with:
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index 13f6aa60..958bcdf1 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -4,6 +4,7 @@ on:
push:
tags:
- '*'
+ workflow_dispatch:
jobs:
release:
@@ -34,6 +35,8 @@ jobs:
- name: Build
if: matrix.os != 'ubuntu-22.04'
+ env:
+ GITUI_RELEASE: 1
run: cargo build
- name: Run tests
if: matrix.os != 'ubuntu-22.04'
@@ -68,15 +71,23 @@ jobs:
- name: Build Release Mac
if: matrix.os == 'macos-latest'
+ env:
+ GITUI_RELEASE: 1
run: make release-mac
- name: Build Release Linux
if: matrix.os == 'ubuntu-latest'
+ env:
+ GITUI_RELEASE: 1
run: make release-linux-musl
- name: Build Release Win
if: matrix.os == 'windows-latest'
+ env:
+ GITUI_RELEASE: 1
run: make release-win
- name: Build Release Linux ARM
if: matrix.os == 'ubuntu-22.04'
+ env:
+ GITUI_RELEASE: 1
run: make release-linux-arm
- name: Set SHA
@@ -90,7 +101,7 @@ jobs:
id: release_notes
uses: ffurrer2/extract-release-notes@v2
- name: Release
- uses: softprops/action-gh-release@v1
+ uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
@@ -102,7 +113,7 @@ jobs:
./release/*.msi
- name: Bump homebrew-core formula
- uses: mislav/bump-homebrew-formula-action@v2
+ uses: mislav/bump-homebrew-formula-action@v3
if: "matrix.os == 'macos-latest' && !contains(github.ref, '-')" # skip prereleases
env:
COMMITTER_TOKEN: ${{ secrets.BREW_TOKEN }}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d39854f8..453c8a79 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,7 +2,7 @@ name: CI
on:
schedule:
- - cron: '0 2 * * *' # run at 2 AM UTC
+ - cron: '0 2 * * *'
push:
branches: [ '*' ]
pull_request:
@@ -78,8 +78,8 @@ jobs:
run: |
cargo install cargo-wix --version 0.3.3
cargo wix --version
- cargo wix -p gitui --no-build --nocapture --output ./target/wix/gitui.msi
- ls -l ./target/wix/gitui.msi
+ 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
@@ -103,7 +103,7 @@ jobs:
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
@@ -219,10 +219,10 @@ jobs:
- 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
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
new file mode 100644
index 00000000..ab4cd463
--- /dev/null
+++ b/.github/workflows/nightly.yml
@@ -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-win.msi $env:AWS_BUCKET_NAME
+ aws s3 cp ./release/gitui-win.tar.gz $env:AWS_BUCKET_NAME