1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-06-02 00:41:42 +00:00

Refactored to a single CI task - with a single artifact

This commit is contained in:
jespergravgaard 2018-09-30 15:51:15 +02:00
parent aee3c197da
commit 66b1249336
6 changed files with 31 additions and 38 deletions

View File

@ -1,20 +1,13 @@
image: maven:3-jdk-8
compile:
release:
stage: build
script:
- "mvn package"
artifacts:
expire_in: 5mins
paths:
- target/kickc-release.zip
release:
stage: deploy
script:
- "ls target"
- "unzip -d target/release target/kickc-release.zip"
- "mv target/release/kickc/* ."
- "cat target/site/jacoco/index.html"
artifacts:
name: kickc_${CI_BUILD_REF_NAME}
paths:

View File

@ -57,7 +57,7 @@ inline void plexSetScreen(byte* screen) {
// Ensure that the indices in PLEX_SORTED_IDX is sorted based on the y-positions in PLEX_YPOS
// Assumes that the positions are nearly sorted already (as each sprite just moves a bit)
// Uses an insertion sort:
// 1. Moves a marker (m) from the start to end of the array. Every time the marker moves forward all elements before the marker are sorted correctly.
// 1. Moves a marker (m) from the start to end of the array. Every time the marker moves forward all elements before the marker are sorted correctly.
// 2a. If the next element after the marker is larger that the current element
// the marker can be moved forwards (as the sorting is correct).
// 2b. If the next element after the marker is smaller than the current element:

View File

@ -16,10 +16,10 @@ kickasm(pc YSIN) {{
}}
kickasm(pc SPRITE, resource "balloon.png") {{
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
}}
void main() {

View File

@ -263,7 +263,7 @@ plexInit: {
.pc = SPRITE "Inline"
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)

View File

@ -9,9 +9,9 @@
.byte round(min+(ampl/2)+(ampl/2)*sin(toRadians(360*i/256)))
}}
kickasm(location (const byte*) SPRITE#0) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
}}
to:@14
@14: scope:[] from @11

View File

@ -260,9 +260,9 @@ plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@3 plexSho
.byte round(min+(ampl/2)+(ampl/2)*sin(toRadians(360*i/256)))
}}
kickasm(location (byte*) SPRITE#0) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
}}
to:@14
main: scope:[main] from @14
@ -1721,9 +1721,9 @@ FINAL CONTROL FLOW GRAPH
.byte round(min+(ampl/2)+(ampl/2)*sin(toRadians(360*i/256)))
}}
kickasm(location (const byte*) SPRITE#0) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
}}
to:@14
@14: scope:[] from @11
@ -2161,7 +2161,7 @@ bbegin:
//SEG3 @11
b11:
//SEG4 kickasm(location (const byte*) YSIN#0) {{ .var min = 50 .var max = 250-21 .var ampl = max-min; .for(var i=0;i<256;i++) .byte round(min+(ampl/2)+(ampl/2)*sin(toRadians(360*i/256))) }}
//SEG5 kickasm(location (const byte*) SPRITE#0) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }}
//SEG5 kickasm(location (const byte*) SPRITE#0) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }}
//SEG6 [3] phi from @11 to @14 [phi:@11->@14]
b14_from_b11:
jmp b14
@ -2748,9 +2748,9 @@ plexInit: {
.pc = SPRITE "Inline"
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
REGISTER UPLIFT POTENTIAL REGISTERS
@ -2971,7 +2971,7 @@ bbegin:
//SEG3 @11
b11:
//SEG4 kickasm(location (const byte*) YSIN#0) {{ .var min = 50 .var max = 250-21 .var ampl = max-min; .for(var i=0;i<256;i++) .byte round(min+(ampl/2)+(ampl/2)*sin(toRadians(360*i/256))) }}
//SEG5 kickasm(location (const byte*) SPRITE#0) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }}
//SEG5 kickasm(location (const byte*) SPRITE#0) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }}
//SEG6 [3] phi from @11 to @14 [phi:@11->@14]
b14_from_b11:
jmp b14
@ -3500,9 +3500,9 @@ plexInit: {
.pc = SPRITE "Inline"
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
ASSEMBLER OPTIMIZATIONS
@ -3869,7 +3869,7 @@ Score: 63464
//SEG2 @begin
//SEG3 @11
//SEG4 kickasm(location (const byte*) YSIN#0) {{ .var min = 50 .var max = 250-21 .var ampl = max-min; .for(var i=0;i<256;i++) .byte round(min+(ampl/2)+(ampl/2)*sin(toRadians(360*i/256))) }}
//SEG5 kickasm(location (const byte*) SPRITE#0) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }}
//SEG5 kickasm(location (const byte*) SPRITE#0) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }}
//SEG6 [3] phi from @11 to @14 [phi:@11->@14]
//SEG7 @14
//SEG8 [4] call main [ ] ( )
@ -4297,8 +4297,8 @@ plexInit: {
.pc = SPRITE "Inline"
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)