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 && \ 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 && \ dpkg -i gcc-toolchain-mips64-x86_64.deb && \
rm 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 && \ 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.14.0.tar.gz -C /usr/local/bin && \ tar -xf sc64-deployer-linux-v2.15.1.tar.gz -C /usr/local/bin && \
rm sc64-deployer-linux-v2.14.0.tar.gz && \ rm sc64-deployer-linux-v2.15.1.tar.gz && \
SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" && \ SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" && \
echo "$SNIPPET" >> "/root/.bashrc" echo "$SNIPPET" >> "/root/.bashrc"

View File

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

View File

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