Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh

Commit

The desktop release builds Windows on g1t's Linux machines. cargo-xwin compiles the C in ring and other crates with clang-cl and links with lld-link and llvm-lib, which the job did not have: it installs clang now, and links each tool where Debian keeps only a versioned name. Each platform's upload replaces an artifact of its name from an earlier attempt, so re-running a failed job no longer fails on the files the first attempt kept.

syntaqxcommitted Parent5c8f498Browse files
1 file+14−10/1 viewed
+14−1
111111 - uses: actions/upload-artifact@v4
112112 with:
113113 name: desktop-linux
114+ overwrite: true
114115 path: target/desktop-release/${{ needs.version.outputs.version }}/
115116
116117 windows:
148149 - uses: actions/upload-artifact@v4
149150 with:
150151 name: desktop-windows
152+ overwrite: true
151153 path: target/desktop-release/${{ needs.version.outputs.version }}/
152154
153155 windows_cross:
167169 run: |
168170 ok=0
169171 for try in 1 2 3; do
170− if sudo apt-get update && sudo apt-get install -y build-essential curl wget file libssl-dev nsis lld llvm; then ok=1; break; fi
172+ if sudo apt-get update && sudo apt-get install -y build-essential curl wget file libssl-dev nsis clang lld llvm; then ok=1; break; fi
171173 sudo apt-get clean; sleep 15
172174 done
173175 [ "$ok" = 1 ]
176+ # cargo-xwin compiles C (ring's, among others) with clang-cl and
177+ # links with lld-link and llvm-lib, which Debian installs under
178+ # versioned names only (clang-cl-19 in /usr/lib/llvm-19/bin).
179+ for tool in clang-cl lld-link llvm-lib; do
180+ command -v "$tool" >/dev/null && continue
181+ found="$(ls /usr/lib/llvm-*/bin/"$tool" 2>/dev/null | sort -V | tail -1)"
182+ [ -n "$found" ] || { echo "::error::$tool is not installed"; exit 1; }
183+ sudo ln -sf "$found" "/usr/local/bin/$tool"
184+ done
174185 cargo install --locked cargo-xwin
175186 - uses: actions/cache@v4
176187 with:
199210 - uses: actions/upload-artifact@v4
200211 with:
201212 name: desktop-windows
213+ overwrite: true
202214 path: target/desktop-release/${{ needs.version.outputs.version }}/
203215
204216 macos:
230242 - uses: actions/upload-artifact@v4
231243 with:
232244 name: desktop-macos
245+ overwrite: true
233246 path: target/desktop-release/${{ needs.version.outputs.version }}/
234247
235248 publish:

Comments

Sign in to comment.