mirror of
https://github.com/bartvdbraak/keyweave.git
synced 2025-04-28 07:11:21 +00:00
feat: add targets for mac and linux
This commit is contained in:
parent
5b0735c120
commit
c9a1f79786
2 changed files with 109 additions and 109 deletions
158
.github/workflows/deploy.yml
vendored
158
.github/workflows/deploy.yml
vendored
|
@ -11,18 +11,18 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
name:
|
name:
|
||||||
# - linux-x86-64-gnu
|
- linux-x86-64-gnu
|
||||||
# - linux-x86-64-musl
|
# - linux-x86-64-musl
|
||||||
# - linux-armhf-gnu
|
# - linux-armhf-gnu
|
||||||
# - linux-arm64-gnu
|
# - linux-arm64-gnu
|
||||||
- mac-x86-64
|
# - mac-x86-64
|
||||||
- mac-arm64
|
# - mac-arm64
|
||||||
include:
|
include:
|
||||||
# - name: linux-x86-64-gnu
|
- name: linux-x86-64-gnu
|
||||||
# os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
# target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
# cross: false
|
cross: false
|
||||||
# experimental: false
|
experimental: false
|
||||||
|
|
||||||
# - name: linux-x86-64-musl
|
# - name: linux-x86-64-musl
|
||||||
# os: ubuntu-latest
|
# os: ubuntu-latest
|
||||||
|
@ -42,17 +42,17 @@ jobs:
|
||||||
# cross: true
|
# cross: true
|
||||||
# experimental: false
|
# experimental: false
|
||||||
|
|
||||||
- name: mac-x86-64
|
# - name: mac-x86-64
|
||||||
os: macos-latest
|
# os: macos-latest
|
||||||
target: x86_64-apple-darwin
|
# target: x86_64-apple-darwin
|
||||||
cross: false
|
# cross: false
|
||||||
experimental: false
|
# experimental: false
|
||||||
|
|
||||||
- name: mac-arm64
|
# - name: mac-arm64
|
||||||
os: macos-11.0
|
# os: macos-11.0
|
||||||
target: aarch64-apple-darwin
|
# target: aarch64-apple-darwin
|
||||||
cross: true
|
# cross: true
|
||||||
experimental: true
|
# experimental: true
|
||||||
|
|
||||||
name: Binaries for ${{ matrix.name }}
|
name: Binaries for ${{ matrix.name }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -85,76 +85,76 @@ jobs:
|
||||||
|
|
||||||
- run: cargo build --release --locked
|
- run: cargo build --release --locked
|
||||||
|
|
||||||
- name: Extract version
|
# - name: Extract version
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
set -euxo pipefail
|
# set -euxo pipefail
|
||||||
|
|
||||||
version=$(grep -m1 -F 'version =' Cargo.toml | cut -d\" -f2)
|
# version=$(grep -m1 -F 'version =' Cargo.toml | cut -d\" -f2)
|
||||||
|
|
||||||
if [[ -z "$version" ]]; then
|
# if [[ -z "$version" ]]; then
|
||||||
echo "Error: no version :("
|
# echo "Error: no version :("
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
echo "$version" > VERSION
|
# echo "$version" > VERSION
|
||||||
|
|
||||||
- name: Package
|
# - name: Package
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
set -euxo pipefail
|
# set -euxo pipefail
|
||||||
ext=""
|
# ext=""
|
||||||
[[ "${{ matrix.name }}" == windows-* ]] && ext=".exe"
|
# [[ "${{ matrix.name }}" == windows-* ]] && ext=".exe"
|
||||||
bin="target/${{ matrix.target }}/release/keyweave${ext}"
|
# bin="target/${{ matrix.target }}/release/keyweave${ext}"
|
||||||
strip "$bin" || true
|
# strip "$bin" || true
|
||||||
dst="keyweave-${{ matrix.target }}"
|
# dst="keyweave-${{ matrix.target }}"
|
||||||
mkdir "$dst"
|
# mkdir "$dst"
|
||||||
cp "$bin" "$dst/"
|
# cp "$bin" "$dst/"
|
||||||
|
|
||||||
- name: Archive (tar)
|
# - name: Archive (tar)
|
||||||
if: '! startsWith(matrix.name, ''windows-'')'
|
# if: '! startsWith(matrix.name, ''windows-'')'
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
set -euxo pipefail
|
# set -euxo pipefail
|
||||||
dst="keyweave-${{ matrix.target }}"
|
# dst="keyweave-${{ matrix.target }}"
|
||||||
tar cavf "$dst.tar.xz" "$dst"
|
# tar cavf "$dst.tar.xz" "$dst"
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
# - uses: actions/upload-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: builds
|
# name: builds
|
||||||
retention-days: 1
|
# retention-days: 1
|
||||||
path: |
|
# path: |
|
||||||
keyweave-*.tar.xz
|
# keyweave-*.tar.xz
|
||||||
|
|
||||||
sign:
|
# sign:
|
||||||
needs: build
|
# needs: build
|
||||||
|
|
||||||
name: Checksum and sign
|
# name: Checksum and sign
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
permissions:
|
# permissions:
|
||||||
id-token: write
|
# id-token: write
|
||||||
contents: write
|
# contents: write
|
||||||
|
|
||||||
steps:
|
# steps:
|
||||||
- uses: actions/checkout@v4
|
# - uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v3
|
# - uses: actions/cache@v3
|
||||||
with:
|
# with:
|
||||||
path: ~/.cargo/bin
|
# path: ~/.cargo/bin
|
||||||
key: sign-tools-${{ hashFiles('.github/workflows/release.yml') }}
|
# key: sign-tools-${{ hashFiles('.github/workflows/release.yml') }}
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
# - uses: actions/download-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: builds
|
# name: builds
|
||||||
|
|
||||||
- name: Checksums with SHA512
|
# - name: Checksums with SHA512
|
||||||
run: sha512sum keyweave-* | tee SHA512SUMS
|
# run: sha512sum keyweave-* | tee SHA512SUMS
|
||||||
|
|
||||||
- uses: softprops/action-gh-release@v1
|
# - uses: softprops/action-gh-release@v1
|
||||||
env:
|
# env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
# with:
|
||||||
generate_release_notes: true
|
# generate_release_notes: true
|
||||||
fail_on_unmatched_files: true
|
# fail_on_unmatched_files: true
|
||||||
files: |
|
# files: |
|
||||||
keyweave-*.tar.xz
|
# keyweave-*.tar.xz
|
||||||
*SUMS*
|
# *SUMS*
|
60
.github/workflows/target-tests.yml
vendored
60
.github/workflows/target-tests.yml
vendored
|
@ -16,11 +16,11 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
name:
|
name:
|
||||||
- linux-x86-64-gnu
|
- linux-x86-64-gnu
|
||||||
# - linux-x86-64-musl
|
- linux-x86-64-musl
|
||||||
# - linux-armhf-gnu
|
- linux-armhf-gnu
|
||||||
# - linux-arm64-gnu
|
- linux-arm64-gnu
|
||||||
# - mac-x86-64
|
- mac-x86-64
|
||||||
# - mac-arm64
|
- mac-arm64
|
||||||
include:
|
include:
|
||||||
- name: linux-x86-64-gnu
|
- name: linux-x86-64-gnu
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
@ -28,35 +28,35 @@ jobs:
|
||||||
cross: false
|
cross: false
|
||||||
experimental: false
|
experimental: false
|
||||||
|
|
||||||
# - name: linux-x86-64-musl
|
- name: linux-x86-64-musl
|
||||||
# os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
# target: x86_64-unknown-linux-musl
|
target: x86_64-unknown-linux-musl
|
||||||
# cross: true
|
cross: true
|
||||||
# experimental: false
|
experimental: false
|
||||||
|
|
||||||
# - name: linux-armhf-gnu
|
- name: linux-armhf-gnu
|
||||||
# os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
# target: armv7-unknown-linux-gnueabihf
|
target: armv7-unknown-linux-gnueabihf
|
||||||
# cross: true
|
cross: true
|
||||||
# experimental: false
|
experimental: false
|
||||||
|
|
||||||
# - name: linux-arm64-gnu
|
- name: linux-arm64-gnu
|
||||||
# os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
# target: aarch64-unknown-linux-gnu
|
target: aarch64-unknown-linux-gnu
|
||||||
# cross: true
|
cross: true
|
||||||
# experimental: false
|
experimental: false
|
||||||
|
|
||||||
# - name: mac-x86-64
|
- name: mac-x86-64
|
||||||
# os: macos-latest
|
os: macos-latest
|
||||||
# target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
# cross: false
|
cross: false
|
||||||
# experimental: false
|
experimental: false
|
||||||
|
|
||||||
# - name: mac-arm64
|
- name: mac-arm64
|
||||||
# os: macos-11.0
|
os: macos-11.0
|
||||||
# target: aarch64-apple-darwin
|
target: aarch64-apple-darwin
|
||||||
# cross: true
|
cross: true
|
||||||
# experimental: true
|
experimental: true
|
||||||
|
|
||||||
name: Binaries for ${{ matrix.name }}
|
name: Binaries for ${{ matrix.name }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
Loading…
Reference in a new issue