-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #158 from nicolasfara/develop
New release v1.0.0
- Loading branch information
Showing
140 changed files
with
12,453 additions
and
2,837 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 |
---|---|---|
|
@@ -24,7 +24,7 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest] | ||
scala: [3.0.1] | ||
java: [adopt@1.8, adopt@1.11, [email protected]] | ||
java: [[email protected], [email protected]] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout current branch (full) | ||
|
@@ -33,7 +33,7 @@ jobs: | |
fetch-depth: 0 | ||
|
||
- name: Setup Java and Scala | ||
uses: olafurpg/setup-scala@v10 | ||
uses: olafurpg/setup-scala@v13 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
|
||
|
@@ -53,15 +53,17 @@ jobs: | |
run: sbt ++${{ matrix.scala }} githubWorkflowCheck | ||
|
||
- name: Lint check with scalafmt | ||
run: sbt ++${{ matrix.scala }} scalafmtCheck | ||
run: sbt ++${{ matrix.scala }} scalafmtCheckAll | ||
|
||
- name: Tests | ||
run: sbt ++${{ matrix.scala }} 'core / test' | ||
run: sbt ++${{ matrix.scala }} test | ||
|
||
- name: Generate JaCoCo report | ||
if: ${{ matrix.java }} == '[email protected]' && ${{ matrix.scala }} == '3.0.1' && github.event_name != 'pull_request' | ||
run: sbt ++${{ matrix.scala }} 'core / jacoco' | ||
|
||
- name: Publish coverage to codecov | ||
if: ${{ matrix.java }} == '[email protected]' && ${{ matrix.scala }} == '3.0.1' && github.event_name != 'pull_request' | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
@@ -92,7 +94,7 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest] | ||
scala: [3.0.1] | ||
java: [adopt@1.8] | ||
java: [adopt@1.11] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout current branch (full) | ||
|
@@ -101,7 +103,7 @@ jobs: | |
fetch-depth: 0 | ||
|
||
- name: Setup Java and Scala | ||
uses: olafurpg/setup-scala@v10 | ||
uses: olafurpg/setup-scala@v13 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
|
||
|
@@ -134,6 +136,9 @@ jobs: | |
args: '-output-format=pdf -file-line-error -synctex=1 -halt-on-error -interaction=nonstopmode -shell-escape' | ||
working_directory: doc | ||
|
||
- name: Create FatJar for the demo | ||
run: sbt ++${{ matrix.scala }} 'demo / assembly' | ||
|
||
- name: Release to Sonatype | ||
env: | ||
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | ||
|
@@ -153,4 +158,4 @@ jobs: | |
core/target/scala-3.0.1/*.jar | ||
core/target/scala-3.0.1/*.pom | ||
demo/target/scala-3.0.1/ECScalaDemo.jar | ||
doc/ecscala-report.pdf | ||
doc/ecscala-report.pdf |
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
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
20 changes: 20 additions & 0 deletions
20
benchmarks/src/main/scala/ecscala/ComponentsContainerBenchmark.scala
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,20 @@ | ||
package ecscala | ||
|
||
import dev.atedeg.ecscala.given | ||
import dev.atedeg.ecscala.{ &:, CNil } | ||
import ecscala.utils.{ JmhSettings, Position, Velocity } | ||
import org.openjdk.jmh.annotations.Benchmark | ||
|
||
class ComponentsContainerBenchmark extends JmhSettings { | ||
|
||
@Benchmark | ||
def componentsContainerBenchmark: Unit = { | ||
val view = world.getView[Position &: Velocity &: CNil] | ||
view foreach { (entity, comps) => | ||
val pos = entity.getComponent[Position].get | ||
val vel = entity.getComponent[Velocity].get | ||
entity.setComponent(Position(pos.x + 1, pos.y + 1)) | ||
entity.setComponent(Velocity(vel.x + 1, vel.y + 1)) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.