ci: make macOS build optional, skip Homebrew tap if it fails
Some checks failed
Release / release (push) Failing after 2m24s
Some checks failed
Release / release (push) Failing after 2m24s
This commit is contained in:
parent
b679a9e1a2
commit
8b74afd8d0
1 changed files with 12 additions and 3 deletions
|
|
@ -40,13 +40,12 @@ jobs:
|
||||||
cd src
|
cd src
|
||||||
git checkout "${{ github.ref_name }}"
|
git checkout "${{ github.ref_name }}"
|
||||||
|
|
||||||
- name: Build release binaries and .deb
|
- name: Build Linux release binary and .deb
|
||||||
working-directory: src
|
working-directory: src
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ github.ref_name }}
|
VERSION=${{ github.ref_name }}
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
|
|
||||||
# Linux amd64 binary + .deb
|
|
||||||
cargo build --release
|
cargo build --release
|
||||||
cargo deb --no-build
|
cargo deb --no-build
|
||||||
cp target/debian/*.deb dist/
|
cp target/debian/*.deb dist/
|
||||||
|
|
@ -56,7 +55,13 @@ jobs:
|
||||||
tar -czf "dist/lines-${VERSION}-linux-amd64.tar.gz" -C "${STAGING}" lines
|
tar -czf "dist/lines-${VERSION}-linux-amd64.tar.gz" -C "${STAGING}" lines
|
||||||
rm -rf "${STAGING}"
|
rm -rf "${STAGING}"
|
||||||
|
|
||||||
# macOS cross-compilation
|
- name: Build macOS release binaries
|
||||||
|
id: macos
|
||||||
|
continue-on-error: true
|
||||||
|
working-directory: src
|
||||||
|
run: |
|
||||||
|
VERSION=${{ github.ref_name }}
|
||||||
|
|
||||||
rustup target add x86_64-apple-darwin aarch64-apple-darwin
|
rustup target add x86_64-apple-darwin aarch64-apple-darwin
|
||||||
cargo install cargo-zigbuild
|
cargo install cargo-zigbuild
|
||||||
cargo zigbuild --release --target x86_64-apple-darwin
|
cargo zigbuild --release --target x86_64-apple-darwin
|
||||||
|
|
@ -73,6 +78,9 @@ jobs:
|
||||||
rm -rf "${STAGING}"
|
rm -rf "${STAGING}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
- name: Print checksums
|
||||||
|
working-directory: src
|
||||||
|
run: |
|
||||||
echo "=== SHA256 checksums ==="
|
echo "=== SHA256 checksums ==="
|
||||||
sha256sum dist/*
|
sha256sum dist/*
|
||||||
|
|
||||||
|
|
@ -123,6 +131,7 @@ jobs:
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Update Homebrew tap
|
- name: Update Homebrew tap
|
||||||
|
if: steps.macos.outcome == 'success'
|
||||||
working-directory: src
|
working-directory: src
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ github.ref_name }}
|
VERSION=${{ github.ref_name }}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue