1919 strategy :
2020 fail-fast : false
2121 matrix :
22- features : ["debugmozjs", '""' ]
22+ features : ["debugmozjs", "" ]
2323 platform :
2424 - { target: aarch64-apple-darwin, os: macos-14 }
2525 - { target: x86_64-apple-darwin, os: macos-13 }
@@ -40,21 +40,20 @@ jobs:
4040 uses :
mozilla-actions/[email protected] 4141 - name : Build
4242 run : |
43- cargo build --verbose --features ${{ matrix.features }}
44- cargo test --tests --examples --verbose --features ${{ matrix.features }}
43+ cargo build --verbose --features " ${{ matrix.features }}"
44+ cargo test --tests --examples --verbose --features " ${{ matrix.features }}"
4545
4646 - name : Generate artifact attestation
4747 uses : actions/attest-build-provenance@v1
48- if : ${{ inputs.release && matrix.features != 'debugmozjs' }}
48+ if : ${{ inputs.release }}
4949 with :
50- subject-path : ./target/libmozjs-${{ matrix.platform.target }}.tar.gz
50+ subject-path : ./target/libmozjs-${{ matrix.platform.target }}${{ matrix.features && '-debugmozjs' || '' }} .tar.gz
5151
5252 - name : Upload artifact
53- if : ${{ matrix.features != 'debugmozjs' }}
5453 uses : actions/upload-artifact@v4
5554 with :
56- path : ./target/libmozjs-${{ matrix.platform.target }}.tar.gz
57- name : libmozjs-${{ matrix.platform.target }}.tar.gz
55+ path : ./target/libmozjs-${{ matrix.platform.target }}${{ matrix.features && '-debugmozjs' || '' }} .tar.gz
56+ name : libmozjs-${{ matrix.platform.target }}${{ matrix.features && '-debugmozjs' || '' }} .tar.gz
5857
5958 linux :
6059 env :
6564 strategy :
6665 fail-fast : false
6766 matrix :
68- features : ["debugmozjs", '""' ]
67+ features : ["debugmozjs", "" ]
6968 steps :
7069 - uses : actions/checkout@v4
7170 - uses : dtolnay/rust-toolchain@stable
7675 uses :
mozilla-actions/[email protected] 7776 - name : Build
7877 run : |
79- cargo build --verbose --features ${{ matrix.features }}
80- cargo test --tests --examples --verbose --features ${{ matrix.features }}
78+ cargo build --verbose --features " ${{ matrix.features }}"
79+ cargo test --tests --examples --verbose --features " ${{ matrix.features }}"
8180 - name : Check wrappers integrity
8281 # we generate wrappers only without debugmozjs
8382 if : ${{ matrix.features != 'debugmozjs' }}
@@ -87,23 +86,22 @@ jobs:
8786
8887 - name : Generate artifact attestation
8988 uses : actions/attest-build-provenance@v1
90- if : ${{ inputs.release && matrix.features != 'debugmozjs' }}
89+ if : ${{ inputs.release }}
9190 with :
92- subject-path : ./target/libmozjs-x86_64-unknown-linux-gnu.tar.gz
91+ subject-path : ./target/libmozjs-x86_64-unknown-linux-gnu${{ matrix.features && '-debugmozjs' || '' }} .tar.gz
9392
9493 - name : Upload artifact
95- if : ${{ matrix.features != 'debugmozjs' }}
9694 uses : actions/upload-artifact@v4
9795 with :
98- path : ./target/libmozjs-x86_64-unknown-linux-gnu.tar.gz
99- name : libmozjs-x86_64-unknown-linux-gnu.tar.gz
96+ path : ./target/libmozjs-x86_64-unknown-linux-gnu${{ matrix.features && '-debugmozjs' || '' }} .tar.gz
97+ name : libmozjs-x86_64-unknown-linux-gnu${{ matrix.features && '-debugmozjs' || '' }} .tar.gz
10098
10199 windows :
102100 runs-on : windows-latest
103101 strategy :
104102 fail-fast : false
105103 matrix :
106- features : ["debugmozjs", '""' ]
104+ features : ["debugmozjs", "" ]
107105 target : ["x86_64-pc-windows-msvc", "aarch64-pc-windows-msvc"]
108106 env :
109107 LINKER : " lld-link.exe"
@@ -126,25 +124,25 @@ jobs:
126124 - name : Build Windows
127125 shell : cmd
128126 run : |
129- cargo build --verbose --target ${{ matrix.target }} --features ${{ matrix.features }}
127+ cargo build --verbose --target ${{ matrix.target }} --features " ${{ matrix.features }}"
130128 - name : Test Windows
131129 if : ${{ !contains(matrix.target, 'aarch64') }}
132130 shell : cmd
133131 run : |
134- cargo test --tests --examples --verbose --target ${{ matrix.target }} --features ${{ matrix.features }}
132+ cargo test --tests --examples --verbose --target ${{ matrix.target }} --features " ${{ matrix.features }}"
135133
136134 - name : Generate artifact attestation
137135 uses : actions/attest-build-provenance@v1
138- if : ${{ inputs.release && !contains(matrix.target, 'aarch64') && matrix.features != 'debugmozjs' }}
136+ if : ${{ inputs.release && !contains(matrix.target, 'aarch64') }}
139137 with :
140- subject-path : ./target/${{ matrix.target }}/libmozjs-x86_64-pc-windows-msvc .tar.gz
138+ subject-path : ./target/${{ matrix.target }}/libmozjs-${{ matrix.target }}${{ matrix.features && '-debugmozjs' || '' }} .tar.gz
141139
142140 - name : Upload artifact
143- if : ${{ !contains(matrix.target, 'aarch64') && matrix.features != 'debugmozjs' }}
141+ if : ${{ !contains(matrix.target, 'aarch64') }}
144142 uses : actions/upload-artifact@v4
145143 with :
146- path : ./target/${{ matrix.target }}/libmozjs-x86_64-pc-windows-msvc .tar.gz
147- name : libmozjs-x86_64-pc-windows-msvc .tar.gz
144+ path : ./target/${{ matrix.target }}/libmozjs-${{ matrix.target }}${{ matrix.features && '-debugmozjs' || '' }} .tar.gz
145+ name : libmozjs-${{ matrix.target }}${{ matrix.features && '-debugmozjs' || '' }} .tar.gz
148146
149147 android :
150148 runs-on : ubuntu-latest
0 commit comments