0.8.0 #219
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build-Linux-Dynamic | |
on: | |
push: | |
branches: | |
- release | |
tags: | |
- "*" | |
pull_request: | |
branches: | |
- release | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Rust project | |
runs-on: ubuntu-latest | |
env: | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
CARGO_INCREMENTAL: 0 | |
steps: | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Install llvm-18 | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 18 | |
- name: Install Dependencies | |
run: sudo apt-get update; sudo apt-get install libarchive-dev libgtk-3-dev webkit2gtk-4.1 libgtksourceview-3.0-dev libayatana-appindicator3-dev | |
- name: Install cargo-packager | |
run: (cargo install cargo-packager || true) | |
- uses: actions/checkout@v4 | |
- uses: r7kamura/rust-problem-matchers@v1 | |
- name: Set build specific env vars | |
run: | | |
echo "CC=${HOMEBREW_PREFIX}/opt/llvm@18/bin/clang" >> "$GITHUB_ENV" | |
echo "CXX=${HOMEBREW_PREFIX}/opt/llvm@18/bin/clang++" >> "$GITHUB_ENV" | |
echo "AR=${HOMEBREW_PREFIX}/opt/llvm@18/bin/llvm-ar" >> "$GITHUB_ENV" | |
echo 'CFLAGS="-flto=full -O3"'' >> "$GITHUB_ENV" | |
echo 'CXXFLAGS="-flto=full -O3"'' >> "$GITHUB_ENV" | |
echo 'RUSTFLAGS="-Zshare-generics=true -Clinker=clang-18 -Clinker-plugin-lto -Clink-arg=-fuse-ld=lld-18"'' >> "$GITHUB_ENV" | |
- name: Build | |
run: cargo build --release | |
- name: Test | |
run: cargo test --release --no-fail-fast --features="leaky-api" -- --nocapture | |
- name: Run cargo-packager | |
run: cargo packager --release --formats appimage | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: linux_dynamic | |
path: target/release/moss |