1
1
name : ps3dec building
2
- on :
2
+
3
+ on :
3
4
workflow_dispatch :
5
+
4
6
env :
5
7
CARGO_TERM_COLOR : always
8
+
6
9
jobs :
7
10
build :
8
11
name : Build on ${{ matrix.os }}
@@ -16,38 +19,52 @@ jobs:
16
19
target : x86_64-unknown-linux-musl
17
20
- os : macos-latest
18
21
target : x86_64-apple-darwin
22
+
19
23
steps :
20
24
- uses : actions/checkout@v2
25
+
21
26
- name : Install Rust
22
27
uses : actions-rs/toolchain@v1
23
28
with :
24
29
toolchain : stable
25
30
target : ${{ matrix.target }}
26
31
override : true
32
+
27
33
- name : Install Linux dependencies
28
34
if : matrix.os == 'ubuntu-latest'
29
35
run : |
30
36
sudo apt-get update
31
37
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
+
32
44
- name : Set up Cargo config
33
45
shell : bash
34
46
run : |
35
47
mkdir -p ~/.cargo
36
48
cat << EOF > ~/.cargo/config
37
49
[target.x86_64-pc-windows-gnu]
38
50
rustflags = ["-C", "target-feature=+crt-static"]
51
+
39
52
[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"]
41
54
linker = "musl-gcc"
55
+
42
56
[target.x86_64-apple-darwin]
43
57
rustflags = ["-C", "target-feature=-crt-static"]
58
+
44
59
[target.aarch64-apple-darwin]
45
60
rustflags = ["-C", "target-feature=-crt-static"]
46
61
EOF
62
+
47
63
- name : Build
48
64
run : |
49
65
rustc -vV
50
66
cargo build --verbose --release --target ${{ matrix.target }}
67
+
51
68
- name : Upload artifact
52
69
uses : actions/upload-artifact@v2
53
70
with :
0 commit comments