File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 52
52
key : ${{ matrix.backend }}
53
53
54
54
- name : Setup rustflags
55
- run : |
56
- mkdir .cargo
57
- echo "[target.'cfg(all())']" > .cargo/config.toml
58
- echo 'rustflags = ["${{ matrix.rustflags }}"]' >> .cargo/config.toml
55
+ run : pwsh ./Parse-Rustflags.ps1 ${{ matrix.rustflags }}
59
56
60
57
- name : Build release
61
58
working-directory : zed
Original file line number Diff line number Diff line change
1
+ $rustflags = $args
2
+
3
+ if ($rustflags.Length -eq 0 ) {
4
+ Write-Host " No rustflags provided"
5
+ exit 0
6
+ }
7
+
8
+ $config_path = " .cargo/config.toml"
9
+
10
+ New-Item - Path $config_path - Force | Out-Null
11
+
12
+ " [target.'cfg(all())']" | Out-File - FilePath $config_path - Append | Out-Null
13
+
14
+ " rustflags = [" | Out-File - FilePath $config_path - Append - NoNewLine | Out-Null
15
+ foreach ($flag in $rustflags ) {
16
+ $line = " "" ${flag} "" , "
17
+ $line | Out-File - FilePath $config_path - Append - NoNewLine | Out-Null
18
+ }
19
+ " ]" | Out-File - FilePath $config_path - Append | Out-Null
You can’t perform that action at this time.
0 commit comments