mirror of
https://codeberg.org/icewind/palantir.git
synced 2026-06-03 18:24:08 +02:00
build for multiple architextures in ci
This commit is contained in:
parent
946eb20e67
commit
d2a0b879fd
2 changed files with 28 additions and 17 deletions
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
|
|
@ -8,28 +8,34 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
release-binaries:
|
release-binaries:
|
||||||
name: Build release binaries
|
name: Build release binaries
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target:
|
||||||
|
- x86_64-unknown-linux-musl
|
||||||
|
- i686-unknown-linux-musl
|
||||||
|
- armv7-unknown-linux-musleabihf
|
||||||
|
- aarch64-unknown-linux-musl
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: musl-tools
|
|
||||||
run: |
|
|
||||||
sudo apt-get install musl-tools
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
target: x86_64-unknown-linux-musl
|
target: ${{ matrix.target }}
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
- uses: actions-rs/cargo@v1
|
- name: Build release binary
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
use-cross: true
|
||||||
command: build
|
command: build
|
||||||
args: --release
|
args: --release --target ${{ matrix.target }}
|
||||||
- name: Upload binary to release --target x86_64-unknown-linux-musl
|
- name: Upload amd64 binary to release
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: target/x86_64-unknown-linux-musl/release/palantir
|
file: target/${{ matrix.target }}/release/palantir
|
||||||
asset_name: palantir
|
asset_name: palantir-${{ matrix.target }}
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
|
|
|
||||||
19
.github/workflows/rust.yml
vendored
19
.github/workflows/rust.yml
vendored
|
|
@ -21,24 +21,29 @@ jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target:
|
||||||
|
- x86_64-unknown-linux-musl
|
||||||
|
- i686-unknown-linux-musl
|
||||||
|
- armv7-unknown-linux-musleabihf
|
||||||
|
- aarch64-unknown-linux-musl
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: musl-tools
|
|
||||||
run: |
|
|
||||||
sudo apt-get install musl-tools
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
target: x86_64-unknown-linux-musl
|
target: ${{ matrix.target }}
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
use-cross: true
|
||||||
command: build
|
command: build
|
||||||
args: --release --target x86_64-unknown-linux-musl
|
args: --release --target ${{ matrix.target }}
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: palantir
|
name: palantir-${{ matrix.target }}
|
||||||
path: target/x86_64-unknown-linux-musl/release/palantir
|
path: target/${{ matrix.target }}/release/palantir
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue