Skip to content

Commit 81009f7

Browse files
authored
Restore fully static linux binaries (#1474)
1 parent 5dc8d38 commit 81009f7

1 file changed

Lines changed: 42 additions & 1 deletion

File tree

.github/workflows/linux.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,4 +378,45 @@ jobs:
378378
with:
379379
name: krokiet-${{ runner.os }}-arm-debug
380380
path: |
381-
target/debug/krokiet
381+
target/debug/krokiet
382+
383+
linux-eyra:
384+
if: ${{ github.ref == 'refs/heads/master' }}
385+
runs-on: ubuntu-20.04
386+
steps:
387+
- uses: actions/checkout@v4
388+
389+
# New versions of nightly rust may call new unimplemented in eyra functions, so use const version
390+
- name: Setup rust version
391+
run: rustup default nightly-2025-03-15
392+
393+
- name: Add eyra
394+
run: |
395+
cd czkawka_cli
396+
cargo add eyra --rename=std
397+
echo 'fn main() { println!("cargo:rustc-link-arg=-nostartfiles"); }' > build.rs
398+
cd ..
399+
400+
- name: Enable LTO
401+
run: sed -i 's/#lto = "thin"/lto = "thin"/g' Cargo.toml
402+
403+
- name: Build Release
404+
run: cargo build --release --bin czkawka_cli
405+
406+
- name: Store Linux CLI Eyra
407+
uses: actions/upload-artifact@v4
408+
with:
409+
name: czkawka_cli-eyra-${{ runner.os }}
410+
path: target/release/czkawka_cli
411+
412+
- name: Prepare files to release
413+
run: |
414+
mv target/release/czkawka_cli linux_czkawka_cli_eyra
415+
416+
- name: Release
417+
uses: softprops/action-gh-release@v2
418+
with:
419+
tag_name: "Nightly"
420+
files: |
421+
linux_czkawka_cli_eyra
422+
token: ${{ secrets.PAT_REPOSITORY }}

0 commit comments

Comments
 (0)