Improve CI (#2)

* Run against devcontainer docker file.
* remove submodule update
* Update SC64 deployer version
This commit is contained in:
Robin Jones 2023-05-28 19:56:38 +01:00 committed by GitHub
parent 37f6352eec
commit dcd41b7585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 29 deletions

View File

@ -6,8 +6,8 @@ RUN apt-get update && \
wget https://github.com/DragonMinded/libdragon/releases/download/toolchain-continuous-prerelease/gcc-toolchain-mips64-x86_64.deb && \
dpkg -i gcc-toolchain-mips64-x86_64.deb && \
rm gcc-toolchain-mips64-x86_64.deb && \
wget https://github.com/Polprzewodnikowy/SummerCart64/releases/download/v2.14.0/sc64-deployer-linux-v2.14.0.tar.gz && \
tar -xf sc64-deployer-linux-v2.14.0.tar.gz -C /usr/local/bin && \
rm sc64-deployer-linux-v2.14.0.tar.gz && \
wget https://github.com/Polprzewodnikowy/SummerCart64/releases/download/v2.15.1/sc64-deployer-linux-v2.15.1.tar.gz && \
tar -xf sc64-deployer-linux-v2.15.1.tar.gz -C /usr/local/bin && \
rm sc64-deployer-linux-v2.15.1.tar.gz && \
SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" && \
echo "$SNIPPET" >> "/root/.bashrc"

View File

@ -6,7 +6,7 @@
"mounts": [
"source=n64flashcartmenu-bashhistory,target=/commandhistory,type=volume"
],
"postCreateCommand": "git submodule update && cd ./libdragon && ./build.sh",
"postCreateCommand": "cd ./libdragon && ./build.sh",
"customizations": {
"vscode": {
"extensions": [

View File

@ -11,42 +11,52 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/n64-tools/gcc-toolchain-mips64:latest # we use an unofficial container for the moment as git-submodules dont work in the official one!
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
volumes:
- my_docker_volume:/volume_mount
# container:
# image: ../Dockerfile
# # credentials:
# # username: ${{ github.actor }}
# # password: ${{ secrets.github_token }}
# volumes:
# - my_docker_volume:/volume_mount
steps:
- name: Check for dockerenv file
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
# - name: Check for dockerenv file
# run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 1 # we only require the last check-in, unless we want to create a changelog.
- name: Build libdragon
run: |
cd ./libdragon
# FIXME: this currently also builds the examples which adds to the build time.
# ./build.sh
# WORKAROUND: for CI
make -j libdragon
make install
make -j tools
make tools-install
make install-mk
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build libdragon
# run: |
# cd ./libdragon
# # FIXME: this currently also builds the examples which adds to the build time.
# # ./build.sh
# # WORKAROUND: for CI
# make -j libdragon
# make install
# make -j tools
# make tools-install
# make install-mk
- name: Build N64FlashcartMenu ROM
run: |
mkdir build
mkdir output
# TODO: split this to use params for each flashcart type.
make
uses: devcontainers/ci@v0.3
with:
push: never
runCmd: |
mkdir build
mkdir output
# TODO: split this to use params for each flashcart type.
make
- name: Upload artifact
uses: actions/upload-artifact@v3