Build apple x86 (#2253)

This commit is contained in:
extrawurst 2024-06-02 13:54:32 +02:00 committed by GitHub
parent baac3d01be
commit a89044fd94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 58 additions and 5 deletions

View File

@ -41,6 +41,9 @@ jobs:
toolchain: ${{ matrix.rust }}
components: clippy
- name: Rustup Show
run: rustup show
- name: Build Debug
run: |
cargo build
@ -171,6 +174,38 @@ jobs:
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.70']
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: Setup target
run: rustup target add x86_64-apple-darwin
- 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

View File

@ -1,6 +1,6 @@
name: Build Nightly Releases
on:
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
@ -34,7 +34,7 @@ jobs:
with:
components: clippy
# ideally we trigger the nightly build/deploy only if the normal nightly CI finished successfully
# 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
@ -69,6 +69,9 @@ jobs:
- name: Build Release Mac
if: matrix.os == 'macos-latest'
run: make release-mac
- name: Build Release Mac x86
if: matrix.os == 'macos-latest'
run: make release-mac-x68
- name: Build Release Linux
if: matrix.os == 'ubuntu-latest'
run: make release-linux-musl
@ -89,7 +92,7 @@ jobs:
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:
@ -100,16 +103,17 @@ jobs:
aws s3 cp ./release/gitui-linux-x86_64.tar.gz $AWS_BUCKET_NAME
- name: MacOS Upload Artifact
if: matrix.os == 'macos-latest'
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
aws s3 cp ./release/gitui-mac-x86.tar.gz $AWS_BUCKET_NAME
- name: Windows Upload Artifact
if: matrix.os == 'windows-latest'
if: matrix.os == 'windows-latest'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }}

View File

@ -26,6 +26,14 @@ release-mac: build-release
tar -C ./target/release/ -czvf ./release/gitui-mac.tar.gz ./gitui
ls -lisah ./release/gitui-mac.tar.gz
release-mac-x86: build-apple-x86-release
strip target/x86_64-apple-darwin/release/gitui
otool -L target/x86_64-apple-darwin/release/gitui
ls -lisah target/x86_64-apple-darwin/release/gitui
mkdir -p release
tar -C ./target/x86_64-apple-darwin/release/ -czvf ./release/gitui-mac-x86.tar.gz ./gitui
ls -lisah ./release/gitui-mac-x86.tar.gz
release-win: build-release
mkdir -p release
tar -C ./target/release/ -czvf ./release/gitui-win.tar.gz ./gitui.exe
@ -38,6 +46,12 @@ release-linux-musl: build-linux-musl-release
mkdir -p release
tar -C ./target/x86_64-unknown-linux-musl/release/ -czvf ./release/gitui-linux-x86_64.tar.gz ./gitui
build-apple-x86-debug:
cargo build --target=x86_64-apple-darwin
build-apple-x86-release:
cargo build --release --target=x86_64-apple-darwin
build-linux-musl-debug:
cargo build --target=x86_64-unknown-linux-musl