Skip to content

Commit

Permalink
[SC64][CI/CD] Moved docker build environment to another repository (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Polprzewodnikowy authored Sep 26, 2021
1 parent 7207d1a commit ec1fbf3
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 217 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
49 changes: 0 additions & 49 deletions .github/workflows/docker.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build fw/hw/sw
name: build

on:
push:
Expand All @@ -22,7 +22,7 @@ jobs:
submodules: true

- name: Build script
run: ./build.sh
run: ./build_in_docker.sh

- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ Current goal is to fix bugs in SDRAM and PC modules.

## Finished sample

![SummerCart64 clean PCB](.media/sc64_clean_pcb.jpg)
![SummerCart64 clean PCB](.github/sc64_clean_pcb.jpg)

![SummerCart64 on table](.media/sc64_on_table.jpg)
![SummerCart64 on table](.github/sc64_on_table.jpg)

![SummerCart64 in partialy disassembled Nintendo 64](.media/sc64_in_n64.jpg)
![SummerCart64 in partialy disassembled Nintendo 64](.github/sc64_in_n64.jpg)
44 changes: 43 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
#!/bin/bash

docker run --mount type=bind,src="$(pwd)",target="/workdir" ghcr.io/polprzewodnikowy/sc64env:v0.9 /bin/bash ./docker/build.sh

PACKAGE_FILE_NAME="SummerCart64"
FILES=(
"./fw/output_files/SummerCart64.pof"
"./hw/v1/ftdi-template.xml"
"./sw/cic/UltraCIC-III.hex"
"./sw/riscv/build/controller.rom"
"./LICENSE"
)


set -e


pushd sw/cic
echo "Building UltraCIC-III software"
avra UltraCIC-III.asm -D attiny45
popd


pushd sw/n64
echo "Building N64 bootloader software"
make clean all
popd


pushd sw/riscv
echo "Building RISC-V controller software"
make clean all
popd


pushd fw
echo "Building FPGA firmware"
quartus_sh --flow compile ./SummerCart64.qpf
popd


echo "Zipping files"
if [[ -e "./${PACKAGE_FILE_NAME}.zip" ]]; then
rm -f "./${PACKAGE_FILE_NAME}.zip"
fi
zip -r "./${PACKAGE_FILE_NAME}.zip" ${FILES[@]}
3 changes: 3 additions & 0 deletions build_in_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker run --mount type=bind,src="$(pwd)",target="/workdir" ghcr.io/polprzewodnikowy/sc64env:v1.0 /bin/bash ./build.sh
93 changes: 0 additions & 93 deletions docker/Dockerfile

This file was deleted.

42 changes: 0 additions & 42 deletions docker/build.sh

This file was deleted.

25 changes: 0 additions & 25 deletions docker/setup_quartus.sh

This file was deleted.

3 changes: 3 additions & 0 deletions fw/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker run --mount type=bind,src="$(pwd)/..",target="/workdir" ghcr.io/polprzewodnikowy/sc64env:v1.0 /bin/bash -c "cd fw && quartus_sh --flow compile ./SummerCart64.qpf"
2 changes: 1 addition & 1 deletion sw/n64/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker run --mount type=bind,src="$(pwd)",target="/workdir" ghcr.io/polprzewodnikowy/sc64env:v0.9 /bin/bash -c "make clean all"
docker run --mount type=bind,src="$(pwd)",target="/workdir" ghcr.io/polprzewodnikowy/sc64env:v1.0 /bin/bash -c "make clean all"
2 changes: 1 addition & 1 deletion sw/riscv/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker run --mount type=bind,src="$(pwd)",target="/workdir" ghcr.io/polprzewodnikowy/sc64env:v0.9 /bin/bash -c "make clean all"
docker run --mount type=bind,src="$(pwd)",target="/workdir" ghcr.io/polprzewodnikowy/sc64env:v1.0 /bin/bash -c "make clean all"

0 comments on commit ec1fbf3

Please sign in to comment.