]> git.nega.tv - josh/narcissus/commitdiff
Use fully qualified path to mold binary
authorJoshua Simmons <josh@nega.tv>
Sat, 29 Oct 2022 15:47:44 +0000 (17:47 +0200)
committerJoshua Simmons <josh@nega.tv>
Sat, 29 Oct 2022 15:47:44 +0000 (17:47 +0200)
Load it into the /usr/ instead of /usr/local on github actions so the
path is the same as when installed as a regular package.

.cargo/config.toml
.github/workflows/rust.yml

index 5c0c649a24fb3da201ccb0baab0d12dddc3785ed..2c3dbcd718f989d41b5ad42a168ba30ee3f864a0 100644 (file)
@@ -1,3 +1,3 @@
 [target.x86_64-unknown-linux-gnu]
 linker = "clang"
-rustflags = ["-C", "link-arg=-fuse-ld=mold"]
\ No newline at end of file
+rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold"]
\ No newline at end of file
index fb1fb4155147af0af54026627d71af4a0963d584..b6d4ca47ef4c1541e69a2b9c91df2584623d7ab3 100644 (file)
@@ -19,7 +19,14 @@ jobs:
       run: |
         sudo apt-get update
         sudo apt-get install libsdl2-dev clang llvm
-    - uses: rui314/setup-mold@v1
+    - name: install_mold
+      run: |
+        version=$(wget -q -O- https://api.github.com/repos/rui314/mold/releases/latest | jq -r .tag_name | sed 's/^v//'); true
+        echo "mold $version"
+        wget -q -O- https://github.com/rui314/mold/releases/download/v$version/mold-$version-$(uname -m)-linux.tar.gz | sudo tar -C /usr/ --strip-components=1 -xzf -
+      shell: bash
+      if: runner.os == 'linux'
+
     - uses: actions/checkout@v3
     - name: Build
       run: cargo build --verbose