@@ -24,52 +24,72 @@ jobs:
24
24
matrix :
25
25
nif : ["2.16", "2.15"]
26
26
job :
27
- - { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04 , use-cross: true }
28
- - { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04 , use-cross: true }
29
- - { target: aarch64-unknown-linux-musl , os: ubuntu-20.04 , use-cross: true }
30
- - { target: aarch64-apple-darwin , os: macos-11 }
31
- - { target: riscv64gc-unknown-linux-gnu , os: ubuntu-20.04 , use-cross: true }
32
- - { target: x86_64-apple-darwin , os: macos-11 }
33
- - { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04 }
34
- - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04 , use-cross: true }
35
- - { target: x86_64-pc-windows-gnu , os: windows-2019 }
36
- - { target: x86_64-pc-windows-msvc , os: windows-2019 }
27
+ - {
28
+ target : arm-unknown-linux-gnueabihf,
29
+ os : ubuntu-20.04,
30
+ use-cross : true,
31
+ }
32
+ - {
33
+ target : aarch64-unknown-linux-gnu,
34
+ os : ubuntu-20.04,
35
+ use-cross : true,
36
+ }
37
+ - {
38
+ target : aarch64-unknown-linux-musl,
39
+ os : ubuntu-20.04,
40
+ use-cross : true,
41
+ }
42
+ - { target: aarch64-apple-darwin, os: macos-12 }
43
+ - {
44
+ target : riscv64gc-unknown-linux-gnu,
45
+ os : ubuntu-20.04,
46
+ use-cross : true,
47
+ }
48
+ - { target: x86_64-apple-darwin, os: macos-12 }
49
+ - { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04 }
50
+ - {
51
+ target : x86_64-unknown-linux-musl,
52
+ os : ubuntu-20.04,
53
+ use-cross : true,
54
+ }
55
+ - { target: x86_64-pc-windows-gnu, os: windows-2019 }
56
+ - { target: x86_64-pc-windows-msvc, os: windows-2019 }
37
57
38
58
steps :
39
- - name : Checkout source code
40
- uses : actions/checkout@v3
59
+ - name : Checkout source code
60
+ uses : actions/checkout@v3
41
61
42
- - name : Extract project version
43
- shell : bash
44
- run : |
45
- # Get the project version from mix.exs
46
- echo "PROJECT_VERSION=$(sed -n 's/^ @version "\(.*\)"/\1/p' mix.exs | head -n1)" >> $GITHUB_ENV
47
- - name : Install Rust toolchain
48
- uses : dtolnay/rust-toolchain@stable
49
- with :
50
- toolchain : stable
51
- target : ${{ matrix.job.target }}
62
+ - name : Extract project version
63
+ shell : bash
64
+ run : |
65
+ # Get the project version from mix.exs
66
+ echo "PROJECT_VERSION=$(sed -n 's/^ @version "\(.*\)"/\1/p' mix.exs | head -n1)" >> $GITHUB_ENV
67
+ - name : Install Rust toolchain
68
+ uses : dtolnay/rust-toolchain@stable
69
+ with :
70
+ toolchain : stable
71
+ target : ${{ matrix.job.target }}
52
72
53
- - name : Build the project
54
- id : build-crate
55
-
56
- with :
57
- project-name : resvg
58
- project-version : ${{ env.PROJECT_VERSION }}
59
- target : ${{ matrix.job.target }}
60
- nif-version : ${{ matrix.nif }}
61
- use-cross : ${{ matrix.job.use-cross }}
62
- project-dir : " native/resvg"
73
+ - name : Build the project
74
+ id : build-crate
75
+
76
+ with :
77
+ project-name : resvg
78
+ project-version : ${{ env.PROJECT_VERSION }}
79
+ target : ${{ matrix.job.target }}
80
+ nif-version : ${{ matrix.nif }}
81
+ use-cross : ${{ matrix.job.use-cross }}
82
+ project-dir : " native/resvg"
63
83
64
- - name : Artifact upload
65
- uses : actions/upload-artifact@v3
66
- with :
67
- name : ${{ steps.build-crate.outputs.file-name }}
68
- path : ${{ steps.build-crate.outputs.file-path }}
84
+ - name : Artifact upload
85
+ uses : actions/upload-artifact@v3
86
+ with :
87
+ name : ${{ steps.build-crate.outputs.file-name }}
88
+ path : ${{ steps.build-crate.outputs.file-path }}
69
89
70
- - name : Publish archives and packages
71
- uses : softprops/action-gh-release@v1
72
- with :
73
- files : |
74
- ${{ steps.build-crate.outputs.file-path }}
75
- if : startsWith(github.ref, 'refs/tags/')
90
+ - name : Publish archives and packages
91
+ uses : softprops/action-gh-release@v1
92
+ with :
93
+ files : |
94
+ ${{ steps.build-crate.outputs.file-path }}
95
+ if : startsWith(github.ref, 'refs/tags/')
0 commit comments