mirror of
https://github.com/JonasunderscoreJones/dayz-linux-gui-launcher.git
synced 2025-10-23 00:29:19 +02:00
reverted change of crossplatform builds
All checks were successful
build-rust / build (push) Successful in 3m1s
All checks were successful
build-rust / build (push) Successful in 3m1s
This commit is contained in:
parent
388faaba5b
commit
11eb5c7403
1 changed files with 11 additions and 27 deletions
|
@ -1,38 +1,22 @@
|
|||
name: build-rust
|
||||
on: [push, pull_request]
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- x86_64-unknown-linux-gnu
|
||||
- x86_64-pc-windows-gnu
|
||||
- x86_64-apple-darwin
|
||||
|
||||
steps:
|
||||
- name: checkout repository
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: install dependencies for metadata parsing
|
||||
run: apt-get update && apt-get install -y jq mingw-w64 clang curl libssl-dev libbz2-dev libz-dev libffi-dev
|
||||
|
||||
- name: install Rust toolchain
|
||||
uses: https://github.com/actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
components: rust-src
|
||||
|
||||
- name: add cross-compilation target
|
||||
run: rustup target add ${{ matrix.target }}
|
||||
|
||||
- name: get binary name
|
||||
id: binary_name
|
||||
run: |
|
||||
name=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].name')
|
||||
echo "binary_name=$name" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: restore cached cargo dependencies
|
||||
uses: https://code.forgejo.org/actions/cache/restore@v4
|
||||
|
@ -41,16 +25,16 @@ jobs:
|
|||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{ matrix.target }}
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
|
||||
|
||||
- name: build project for target
|
||||
run: cargo build --release --target ${{ matrix.target }}
|
||||
- name: build project
|
||||
run: cargo build --release
|
||||
|
||||
- name: upload compiled binary
|
||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||
with:
|
||||
name: rust-binary-${{ matrix.target }}
|
||||
path: target/${{ matrix.target }}/release/${{ steps.binary_name.outputs.binary_name }}
|
||||
name: rust-binary
|
||||
path: target/release/*
|
||||
if-no-files-found: error
|
||||
|
||||
- name: cache cargo dependencies
|
||||
|
@ -61,4 +45,4 @@ jobs:
|
|||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{ matrix.target }}
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue