mirror of
https://github.com/JonasunderscoreJones/dayz-linux-gui-launcher.git
synced 2025-10-23 06: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
|
name: build-rust
|
||||||
on: [push, pull_request]
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
target:
|
|
||||||
- x86_64-unknown-linux-gnu
|
|
||||||
- x86_64-pc-windows-gnu
|
|
||||||
- x86_64-apple-darwin
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repository
|
- name: checkout repository
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
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
|
- name: install Rust toolchain
|
||||||
uses: https://github.com/actions-rs/toolchain@v1
|
uses: https://github.com/actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
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
|
- name: restore cached cargo dependencies
|
||||||
uses: https://code.forgejo.org/actions/cache/restore@v4
|
uses: https://code.forgejo.org/actions/cache/restore@v4
|
||||||
|
@ -41,16 +25,16 @@ jobs:
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
~/.cargo/git
|
~/.cargo/git
|
||||||
target
|
target
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{ matrix.target }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
|
||||||
|
|
||||||
- name: build project for target
|
- name: build project
|
||||||
run: cargo build --release --target ${{ matrix.target }}
|
run: cargo build --release
|
||||||
|
|
||||||
- name: upload compiled binary
|
- name: upload compiled binary
|
||||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: rust-binary-${{ matrix.target }}
|
name: rust-binary
|
||||||
path: target/${{ matrix.target }}/release/${{ steps.binary_name.outputs.binary_name }}
|
path: target/release/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: cache cargo dependencies
|
- name: cache cargo dependencies
|
||||||
|
@ -61,4 +45,4 @@ jobs:
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
~/.cargo/git
|
~/.cargo/git
|
||||||
target
|
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