diff options
| author | pml68 <contact@pml68.dev> | 2025-03-23 16:07:59 +0100 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-03-23 16:07:59 +0100 |
| commit | ea98cf602b5f0c1692d0dbcaea0c35060ed35391 (patch) | |
| tree | c4d333b276ba4e76b5ab0121f5908da104c9d101 | |
| parent | docs: update TODO.md (diff) | |
| download | iced-builder-ea98cf602b5f0c1692d0dbcaea0c35060ed35391.tar.gz | |
ci: add caching, use mold for linking
| -rw-r--r-- | .cargo/config.toml | 6 | ||||
| -rw-r--r-- | .github/workflows/build.yml | 13 | ||||
| -rw-r--r-- | .github/workflows/ci.yml | 15 | ||||
| -rw-r--r-- | Cargo.toml | 8 | ||||
| -rw-r--r-- | PKGBUILD | 10 |
5 files changed, 41 insertions, 11 deletions
diff --git a/.cargo/config.toml b/.cargo/config.toml index e0aa01f..80a170c 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -2,9 +2,9 @@ lint = "clippy --no-deps -- -D warnings" lint-all = "clippy --no-deps -- -D clippy::pedantic" -# [target.x86_64-unknown-linux-gnu] -# linker = "clang" -# rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold"] +[target.x86_64-unknown-linux-gnu] +linker = "clang" +rustflags = ["-C", "link-arg=-fuse-ld=mold"] # [build] # rustflags = ["-Z", "threads=6"] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0af166..25b4c6a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,9 +19,18 @@ jobs: run: | export DEBIAN_FRONTED=noninteractive sudo apt-get -qq update - sudo apt-get install -y libxkbcommon-dev libgtk-3-dev + sudo apt-get install -y libxkbcommon-dev libgtk-3-dev clang mold + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Build iced-builder binary - run: cargo build --verbose --release + run: cargo build --verbose --profile ci - name: Archive iced-builder binary if: matrix.rust-version == 'stable' uses: actions/upload-artifact@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eba27cf..97439df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,17 @@ jobs: run: | export DEBIAN_FRONTED=noninteractive sudo apt-get -qq update - sudo apt-get install -y libxkbcommon-dev libgtk-3-dev + sudo apt-get install -y libxkbcommon-dev libgtk-3-dev clang mold + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Check lints - run: cargo lint + run: cargo lint --profile ci - name: Run tests - run: cargo test --verbose + run: cargo test --verbose --profile ci @@ -10,6 +10,10 @@ categories = ["gui"] keywords = ["gui", "ui", "graphics", "interface", "widgets"] rust-version = "1.85.0" +[features] +default = [] +debug = ["iced/debug"] + [dependencies] iced.workspace = true iced_anim = { git = "https://github.com/pml68/iced_anim", features = ["derive"] } @@ -44,6 +48,10 @@ windows_exe_info = "0.4" [profile.dev] opt-level = 1 +[profile.ci] +inherits = "dev" +opt-level = 0 + [profile.dev.package."*"] opt-level = 3 @@ -2,7 +2,7 @@ pkgname=iced-builder _pkgver=0.1.0 -pkgver=0.1.0.g256e3ba +pkgver=0.1.0.g5583c7a pkgrel=1 pkgdesc='UI builder for iced, built with iced.' arch=(x86_64) @@ -12,13 +12,12 @@ depends=( gcc-libs glibc gtk3 - rustfmt ) makedepends=( git cargo ) -options=('!lto' '!debug') +options=('!lto' '!strip' '!debug') source=("$pkgname::git+${url}.git") sha256sums=('SKIP') @@ -43,7 +42,12 @@ build() { } package() { + depends=( + rustfmt + ) + cd "${pkgname}" install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } |
