diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 420ca21..a599e97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,11 +17,26 @@ jobs: - name: Build object files run: bash tools/crosscompile.sh + - name: Generate debug asm files + run: | + bash tools/inspect.sh + echo '
test.copapy.asm
' >> $GITHUB_STEP_SUMMARY + echo bin/test.copapy.asm >> $GITHUB_STEP_SUMMARY + echo '' >> $GITHUB_STEP_SUMMARY + echo '
stencils_x86_64_O3.asm
' >> $GITHUB_STEP_SUMMARY + echo bin/stencils_x86_64_O3.asm >> $GITHUB_STEP_SUMMARY + echo '' >> $GITHUB_STEP_SUMMARY + - uses: actions/upload-artifact@v4 with: name: stencil-object-files path: src/copapy/obj/*.o + - uses: actions/upload-artifact@v4 + with: + name: inspect-asm-files + path: bin/*.asm + build-ubuntu: needs: [build_stencils] runs-on: ubuntu-latest diff --git a/tests/test_compile.py b/tests/test_compile.py index 695403f..6b37f91 100644 --- a/tests/test_compile.py +++ b/tests/test_compile.py @@ -55,7 +55,7 @@ def test_compile(): il, variables = copapy.compile_to_instruction_list(out, copapy.generic_sdb) # run program command - #il.write_com(binwrite.Command.RUN_PROG) + il.write_com(binwrite.Command.RUN_PROG) for net in ret: copapy.add_read_command(il, variables, net) @@ -72,8 +72,8 @@ def test_compile(): print(result) print('--') - #assert 'Return value: 1' in result - assert 'END_COM' in result + assert 'Return value: 1' in result + #assert 'END_COM' in result if __name__ == "__main__": diff --git a/tools/build.sh b/tools/build.sh index 2ba301d..262ad3d 100644 --- a/tools/build.sh +++ b/tools/build.sh @@ -6,9 +6,10 @@ SRC=bin/stencils.c DEST=src/copapy/obj python tools/generate_stencils.py $SRC mkdir -p $DEST -gcc -c $SRC -O0 -o $DEST/stencils_x86_64_O0.o -gcc -c $SRC -O1 -o $DEST/stencils_x86_64_O1.o -gcc -c $SRC -O2 -o $DEST/stencils_x86_64_O2.o +gcc --version +#gcc -c $SRC -O0 -o $DEST/stencils_x86_64_O0.o +#gcc -c $SRC -O1 -o $DEST/stencils_x86_64_O1.o +#gcc -c $SRC -O2 -o $DEST/stencils_x86_64_O2.o gcc -c $SRC -O3 -o $DEST/stencils_x86_64_O3.o mkdir bin -p