Skip to content

Commit

Permalink
Fixes and improvements for CI, sprite resizing, and database creation***
Browse files Browse the repository at this point in the history
***Added offline testing case in main.go for full project run***

***Total Time for full offline test: 4.360724434016666 minutes***

***See "next features" section for remaining work
  • Loading branch information
joachimbbp committed Mar 11, 2024
1 parent e469629 commit 0018c9a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
17 changes: 15 additions & 2 deletions devnotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
- Once this is fixed, have the CI run a batch (not just video)

# PULL REQUESTS AND CONTRIBUTERS
- feel free to contact [email protected] for any questions
- feel free to contact me at [email protected] for any questions
-

# WISH LIST
- Better CI tools which work with raylib
- Raylib sprite resize
- Goroutine database creation
- Fix issue with crashing while processing large batches (see known bugs)
- Generate docs

# BLOG:
March 01 2024:
Expand Down Expand Up @@ -36,4 +44,9 @@ March 11 2024:
Was pretty tired on friday so made some less than stellar decisions with the batch processing. Refactored today and it's much better.
However, there seems to be a memory leak (or something) that causes the program to crash after processing many sprites, especially at a higher "reslolution" (meaning, confusingly, a lower sprite resolution, thus more sprites per image)
Adding After Effects switcher.
Upon further investigation, it does not appear to be a memory leak. It just crashes at some point.
Upon further investigation, it does not appear to be a memory leak. It just crashes at some point.

Github actions do not take in raylib, so built out an offline testing case in main which runs the whole project from no resized sprites or database to a final image.
Total Time for full offline test: 4.360724434016666 minutes

Calling it for now as I want to go work on some other projects but there's still some work to be done (see "next features" section)
29 changes: 29 additions & 0 deletions src/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,34 @@ func main() {
sprite.Resize(util.SpriteInput, util.SpriteSizes, true)
/*raylib functions use a window and thus cannot be run with github actions
Thus this only tests if the database will run*/

case "full_offline_test":
fmt.Println("Full Offline Test")
//TODO: is there a way to dry this?

dbTime, _, _ := util.TimeIt(
"database creation",
sprite.Database,
util.SpriteInput,
util.DatabaseFolderPath,
false,
)
resizeTime, _, _ := util.TimeIt(
"resizing",
sprite.Resize,
util.SpriteInput,
util.SpriteSizes,
false,
)

videoTime, _, _ := util.TimeIt(
"Generating Video",
video.Sequence,
util.SequencePath,
util.DatabasePath,
5, //set this to choose the desired resolution. Hard coded at 5 for CI for now
)
totalTime := dbTime + resizeTime + videoTime
fmt.Println("Total Time for full offline test: ", totalTime.Minutes(), "minutes")
}
}

0 comments on commit 0018c9a

Please sign in to comment.