summaryrefslogtreecommitdiff
path: root/.builds
diff options
context:
space:
mode:
authorPolesznyák Márk <contact@pml68.dev>2025-12-31 21:00:39 +0100
committerPolesznyák Márk <contact@pml68.dev>2025-12-31 21:02:20 +0100
commit78a5ef7b4252bd6034431573528dd08256c15075 (patch)
tree1f7e08bb16411b639d21badaff4891199f328124 /.builds
parentchore: update deps (diff)
downloadiced-builder-78a5ef7b4252bd6034431573528dd08256c15075.tar.gz
ci: add a workflow for MacOS builds
Diffstat (limited to '.builds')
-rw-r--r--.builds/apple.yml46
-rw-r--r--.builds/linux.yml54
2 files changed, 100 insertions, 0 deletions
diff --git a/.builds/apple.yml b/.builds/apple.yml
new file mode 100644
index 0000000..4187012
--- /dev/null
+++ b/.builds/apple.yml
@@ -0,0 +1,46 @@
+image: ubuntu/noble
+packages:
+ - rustup
+ - pkg-config
+ - libxkbcommon-dev
+ - libssl-dev
+environment:
+ SDKROOT: /home/build/MacOSX11.3.sdk
+ ZIG_VERSION: 0.13.0
+triggers:
+ - action: email
+ condition: failure
+ to: "<~pml68/iced-crates@lists.sr.ht>"
+artifacts:
+ - iced-builder-x86_64-apple-darwin
+ - iced-builder-aarch64-apple-darwin
+tasks:
+ - sdkroot: |
+ curl -L "https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz" | tar -J -x
+ - zig: |
+ curl -L "https://ziglang.org/download/$ZIG_VERSION/zig-linux-x86_64-$ZIG_VERSION.tar.xz" | tar -J -x
+ mv "zig-linux-x86_64-$ZIG_VERSION" zig
+ - rust-setup: |
+ rustup toolchain install stable --profile default
+ rustup target add x86_64-apple-darwin aarch64-apple-darwin
+ rustup default stable
+ - cargo-zigbuild: |
+ cargo install --git https://github.com/rust-cross/cargo-zigbuild --rev 69b8367 cargo-zigbuild
+ - build-aarch64: |
+ cd iced-builder
+
+ export PATH="/home/build/zig/:$PATH"
+ which zig
+
+ cargo zigbuild --verbose --release --target aarch64-apple-darwin
+
+ cp target/aarch64-apple-darwin/release/iced-builder ../iced-builder-aarch64-apple-darwin
+ - build-x86_64: |
+ cd iced-builder
+
+ export PATH="/home/build/zig/:$PATH"
+ which zig
+
+ cargo zigbuild --verbose --release --target x86_64-apple-darwin
+
+ cp target/x86_64-apple-darwin/release/iced-builder ../iced-builder-x86_64-apple-darwin
diff --git a/.builds/linux.yml b/.builds/linux.yml
new file mode 100644
index 0000000..ae6a827
--- /dev/null
+++ b/.builds/linux.yml
@@ -0,0 +1,54 @@
+image: ubuntu/noble
+packages:
+ - rustup
+ - pkg-config
+ - libxkbcommon-dev
+ - libssl-dev
+ - clang
+ - mold
+environment:
+ MSRV: 1.88.0
+ RUSTFLAGS: -C linker=clang -C link-arg=-fuse-ld=mold
+triggers:
+ - action: email
+ condition: failure
+ to: "<~pml68/iced-crates@lists.sr.ht>"
+artifacts:
+ - iced-builder-x86_64-unknown-linux-gnu
+tasks:
+ - rust-setup: |
+ rustup toolchain install stable --profile default -c clippy
+ rustup toolchain install nightly --profile default
+ rustup toolchain install $MSRV --profile default
+ rustup default stable
+ - lint: |
+ cd iced-builder
+ cargo lint
+ - test: |
+ cd iced-builder
+ cargo test --verbose --workspace
+ - environment: |
+ cd iced-builder
+ if [ "$BUILD_SUBMITTER" = "git.sr.ht" ]
+ then
+ [ "$GIT_REF" = "refs/heads/master" ] || complete-build
+ [ "$(git remote get-url origin)" = "https://git.sr.ht/~pml68/iced-builder" ] || complete-build
+ fi
+ [ "$BUILD_REASON" != "patchset" ] || complete-build
+ - build-stable: |
+ cd iced-builder
+
+ export RUSTUP_TOOLCHAIN=stable
+ cargo build --verbose --profile release-opt
+
+ cp target/release-opt/iced-builder ../iced-builder-x86_64-unknown-linux-gnu
+ - build-msrv: |
+ cd iced-builder
+
+ export RUSTUP_TOOLCHAIN=$MSRV
+ cargo build --verbose --profile release-opt
+ - build-nightly: |
+ cd iced-builder
+
+ export RUSTUP_TOOLCHAIN=nightly
+ cargo build --verbose --profile release-opt