Skip to content

Commit

Permalink
Ignore luda-adventure (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfoodK authored Aug 25, 2023
1 parent e13c13b commit fb6105e
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 68 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/namui-test-host-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,17 @@ jobs:
target: wasm-unknown-web
path: namui/sample/rect

test-luda-adventure:
needs: [check-rebuild]
if: needs.check-rebuild.outputs.luda-adventure == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/init-test-job
- uses: ./.github/actions/namui-test
with:
target: wasm-unknown-web
path: luda-adventure
# test-luda-adventure:
# needs: [check-rebuild]
# if: needs.check-rebuild.outputs.luda-adventure == 'true'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/init-test-job
# - uses: ./.github/actions/namui-test
# with:
# target: wasm-unknown-web
# path: luda-adventure

# NOTE: This is for status check of pull request.
post-test:
Expand All @@ -166,7 +166,7 @@ jobs:
- test-luda-editor
- test-namui-prebuilt
- test-namui-sample
- test-luda-adventure
# - test-luda-adventure
steps:
- run: echo ${{ join(needs.*.result, ',') }}
- run: echo "any_test_failed=${{ contains(join(needs.*.result, ','), 'failure') }}" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode/settings.json
3 changes: 3 additions & 0 deletions .ignored_projects
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Write down the cargo manifest dir to ignore
luda-adventure
luda-adventure/ecs-macro
24 changes: 0 additions & 24 deletions .vscode/settings.json

This file was deleted.

22 changes: 16 additions & 6 deletions cargo-check-and-fmt-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,35 @@
import os
from platform import uname

ignored_projects = list(
filter(
lambda line: not line.startswith("#"),
open(".ignored_projects", "r").readlines(),
)
)


def in_wsl() -> bool:
return 'microsoft-standard' in uname().release
return "microsoft-standard" in uname().release


def run():
for manifest_path in os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines():
for manifest_path in (
os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines()
):
dir_path = os.path.dirname(manifest_path)
if dir_path in ignored_projects:
continue

print(f"cd {dir_path} && cargo check")
exit = os.system(
f"cd {dir_path} && cargo check")
exit = os.system(f"cd {dir_path} && cargo check")
if exit != 0:
print(f"\n\n-- fail cargo check on {dir_path}\n\n")
return

print(f"cd {dir_path} && cargo fmt")
dir_path = os.path.dirname(manifest_path)
exit = os.system(
f"cd {dir_path} && cargo fmt")
exit = os.system(f"cd {dir_path} && cargo fmt")
if exit != 0:
print(f"\n\n-- fail cargo fmt on {dir_path}\n\n")
return
Expand Down
18 changes: 14 additions & 4 deletions cargo-clean-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,28 @@
import os
from platform import uname

ignored_projects = list(
filter(
lambda line: not line.startswith("#"),
open(".ignored_projects", "r").readlines(),
)
)


def in_wsl() -> bool:
return 'microsoft-standard' in uname().release
return "microsoft-standard" in uname().release


def run():
for manifest_path in os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines():
for manifest_path in (
os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines()
):
dir_path = os.path.dirname(manifest_path)
if dir_path in ignored_projects:
continue

print(f"cd {dir_path} && cargo clean")
exit = os.system(
f"cd {dir_path} && cargo clean")
exit = os.system(f"cd {dir_path} && cargo clean")
if exit != 0:
print(f"\n\n-- fail cargo clean on {dir_path}\n\n")
return
Expand Down
24 changes: 16 additions & 8 deletions cargo-clean-check-fmt-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,41 @@
import os
from platform import uname

ignored_projects = list(
filter(
lambda line: not line.startswith("#"),
open(".ignored_projects", "r").readlines(),
)
)


def in_wsl() -> bool:
return 'microsoft-standard' in uname().release
return "microsoft-standard" in uname().release


def run():
for manifest_path in os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines():
for manifest_path in (
os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines()
):
dir_path = os.path.dirname(manifest_path)
if dir_path in ignored_projects:
continue

print(f"cd {dir_path} && cargo clean")
exit = os.system(
f"cd {dir_path} && cargo clean")
exit = os.system(f"cd {dir_path} && cargo clean")
if exit != 0:
print(f"\n\n-- fail cargo clean on {dir_path}\n\n")
return

print(f"cd {dir_path} && cargo check")
exit = os.system(
f"cd {dir_path} && cargo check")
exit = os.system(f"cd {dir_path} && cargo check")
if exit != 0:
print(f"\n\n-- fail cargo check on {dir_path}\n\n")
return

print(f"cd {dir_path} && cargo fmt")
dir_path = os.path.dirname(manifest_path)
exit = os.system(
f"cd {dir_path} && cargo fmt")
exit = os.system(f"cd {dir_path} && cargo fmt")
if exit != 0:
print(f"\n\n-- fail cargo fmt on {dir_path}\n\n")
return
Expand Down
26 changes: 20 additions & 6 deletions cargo-fix-fmt-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,39 @@
import os
from platform import uname

ignored_projects = list(
filter(
lambda line: not line.startswith("#"),
open(".ignored_projects", "r").readlines(),
)
)


def in_wsl() -> bool:
return 'microsoft-standard' in uname().release
return "microsoft-standard" in uname().release


def run():
for manifest_path in os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines():
for manifest_path in (
os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines()
):
dir_path = os.path.dirname(manifest_path)
if dir_path in ignored_projects:
continue

print(f"cd {dir_path} && cargo fix --allow-dirty --allow-staged --broken-code")
exit = os.system(
f"cd {dir_path} && cargo fix --allow-dirty --allow-staged --broken-code")
f"cd {dir_path} && cargo fix --allow-dirty --allow-staged --broken-code"
)
if exit != 0:
print(f"\n\n-- fail cargo fix --allow-dirty --allow-staged --broken-code on {dir_path}\n\n")
print(
f"\n\n-- fail cargo fix --allow-dirty --allow-staged --broken-code on {dir_path}\n\n"
)
return

print(f"cd {dir_path} && cargo fmt")
dir_path = os.path.dirname(manifest_path)
exit = os.system(
f"cd {dir_path} && cargo fmt")
exit = os.system(f"cd {dir_path} && cargo fmt")
if exit != 0:
print(f"\n\n-- fail cargo fmt on {dir_path}\n\n")
return
Expand Down
20 changes: 16 additions & 4 deletions cargo-metadata-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,33 @@
import os
from platform import uname

ignored_projects = list(
filter(
lambda line: not line.startswith("#"),
open(".ignored_projects", "r").readlines(),
)
)


def in_wsl() -> bool:
return 'microsoft-standard' in uname().release
return "microsoft-standard" in uname().release


def run():
for manifest_path in os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines():
for manifest_path in (
os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines()
):
dir_path = os.path.dirname(manifest_path)
if dir_path in ignored_projects:
continue

print(f"cd {dir_path} && cargo metadata")
exit = os.system(
f"cd {dir_path} && cargo metadata")
exit = os.system(f"cd {dir_path} && cargo metadata")
if exit != 0:
print(f"\n\n-- fail cargo metadata on {dir_path}\n\n")
return


run()
if in_wsl():
os.system("powershell.exe '[console]::beep(261.6,700)'")
Expand Down
18 changes: 14 additions & 4 deletions cargo-update-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,27 @@
import os
from platform import uname

ignored_projects = list(
filter(
lambda line: not line.startswith("#"),
open(".ignored_projects", "r").readlines(),
)
)


def in_wsl() -> bool:
return 'microsoft-standard' in uname().release
return "microsoft-standard" in uname().release


def run():
for manifest_path in os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines():
for manifest_path in (
os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines()
):
dir_path = os.path.dirname(manifest_path)
if dir_path in ignored_projects:
continue
print(f"cd {dir_path} && cargo update")
exit = os.system(
f"cd {dir_path} && cargo update")
exit = os.system(f"cd {dir_path} && cargo update")
if exit != 0:
print(f"\n\n-- fail cargo update on {dir_path}\n\n")
return
Expand Down

0 comments on commit fb6105e

Please sign in to comment.