Skip to content

Commit

Permalink
Update rust.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Redrrx authored Jul 28, 2024
1 parent 746adec commit 70aafd8
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: ps3dec building
on:

on:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build on ${{ matrix.os }}
Expand All @@ -16,38 +19,52 @@ jobs:
target: x86_64-unknown-linux-musl
- os: macos-latest
target: x86_64-apple-darwin

steps:
- uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true

- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y musl-tools musl-dev gcc-multilib
- name: Install macOS dependencies
if: matrix.os == 'macos-latest'
run: |
brew install coreutils
- name: Set up Cargo config
shell: bash
run: |
mkdir -p ~/.cargo
cat << EOF > ~/.cargo/config
[target.x86_64-pc-windows-gnu]
rustflags = ["-C", "target-feature=+crt-static"]
[target.x86_64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static", "-C", "link-arg=-lgcc", "-C", "link-arg=-static-libgcc"]
rustflags = ["-C", "target-feature=-crt-static"]
linker = "musl-gcc"
[target.x86_64-apple-darwin]
rustflags = ["-C", "target-feature=-crt-static"]
[target.aarch64-apple-darwin]
rustflags = ["-C", "target-feature=-crt-static"]
EOF
- name: Build
run: |
rustc -vV
cargo build --verbose --release --target ${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
Expand Down

0 comments on commit 70aafd8

Please sign in to comment.