Skip to content

Commit 70aafd8

Browse files
authored
Update rust.yml
1 parent 746adec commit 70aafd8

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/rust.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
name: ps3dec building
2-
on:
2+
3+
on:
34
workflow_dispatch:
5+
46
env:
57
CARGO_TERM_COLOR: always
8+
69
jobs:
710
build:
811
name: Build on ${{ matrix.os }}
@@ -16,38 +19,52 @@ jobs:
1619
target: x86_64-unknown-linux-musl
1720
- os: macos-latest
1821
target: x86_64-apple-darwin
22+
1923
steps:
2024
- uses: actions/checkout@v2
25+
2126
- name: Install Rust
2227
uses: actions-rs/toolchain@v1
2328
with:
2429
toolchain: stable
2530
target: ${{ matrix.target }}
2631
override: true
32+
2733
- name: Install Linux dependencies
2834
if: matrix.os == 'ubuntu-latest'
2935
run: |
3036
sudo apt-get update
3137
sudo apt-get install -y musl-tools musl-dev gcc-multilib
38+
39+
- name: Install macOS dependencies
40+
if: matrix.os == 'macos-latest'
41+
run: |
42+
brew install coreutils
43+
3244
- name: Set up Cargo config
3345
shell: bash
3446
run: |
3547
mkdir -p ~/.cargo
3648
cat << EOF > ~/.cargo/config
3749
[target.x86_64-pc-windows-gnu]
3850
rustflags = ["-C", "target-feature=+crt-static"]
51+
3952
[target.x86_64-unknown-linux-musl]
40-
rustflags = ["-C", "target-feature=-crt-static", "-C", "link-arg=-lgcc", "-C", "link-arg=-static-libgcc"]
53+
rustflags = ["-C", "target-feature=-crt-static"]
4154
linker = "musl-gcc"
55+
4256
[target.x86_64-apple-darwin]
4357
rustflags = ["-C", "target-feature=-crt-static"]
58+
4459
[target.aarch64-apple-darwin]
4560
rustflags = ["-C", "target-feature=-crt-static"]
4661
EOF
62+
4763
- name: Build
4864
run: |
4965
rustc -vV
5066
cargo build --verbose --release --target ${{ matrix.target }}
67+
5168
- name: Upload artifact
5269
uses: actions/upload-artifact@v2
5370
with:

0 commit comments

Comments
 (0)