-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: John Nunley <[email protected]>
- Loading branch information
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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 | ||
|