Skip to content

Commit

Permalink
Port to sr.ht
Browse files Browse the repository at this point in the history
Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull committed Sep 26, 2023
1 parent 4311baa commit 9168c33
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
image: alpine/edge
packages:
- clang
- curl
sources:
- https://git.sr.ht/~notgull/theo
secrets:
- 424251f4-3b9e-4f8b-8361-e000fe6222f3
tasks:
- test: |
cd theo
curl https://sh.rustup.rs -sSf | sh -s -- -y
sh ci/ci.sh
- mirror: |
cd theo
git remote add github_origin [email protected]:notgull/theo.git
git push github_origin main
62 changes: 62 additions & 0 deletions ci/ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/sh

set -eu

# Run CI-based tests for Theo

rx() {
cmd="$1"
shift

(
set -x
"$cmd" "$@"
)
}

theo_test_version() {
version="$1"
extended_tests="$2"

rustup toolchain add "$version" --profile minimal
rustup default "$version"

echo ">> Testing various feature sets..."
rx cargo test
rx cargo build --all --all-features --all-targets
rx cargo build --no-default-features --features x11,gl,egl,glx,wgl
rx cargo build --no-default-features --features x11

if ! $extended_tests; then
return
fi

echo ">> Build for wasm32-unknown-unknown..."
rustup target add wasm32-unknown-unknown
rx cargo build --target wasm32-unknown-unknown --no-default-features
rx cargo build --target wasm32-unknown-unknown --no-default-features --features gl

echo ">> Build for x86_64-pc-windows-gnu"
rustup target add x86_64-pc-windows-gnu
rx cargo build --target x86_64-pc-windows-gnu
rx cargo build --target x86_64-pc-windows-gnu --no-default-features --features gl,wgl,egl
}

theo_tidy() {
rustup toolchain add stable --profile minimal
rustup default stable

rx cargo fmt --all --check
rx cargo clippy --all-features --all-targets
}

if ! command -v rustup; then
rustup-init -y
fi

theo_tidy
theo_test_version stable true
theo_test_version beta true
theo_test_version nightly true
theo_test_version 1.65.0 false

0 comments on commit 9168c33

Please sign in to comment.