Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): add simple build workflow #914

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:22.04

RUN apt-get update && apt-get upgrade -y && \
apt-get install -y make wget xz-utils && \
wget -qO- "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz?revision=d0b90559-3960-4e4b-9297-7ddbc3e52783&rev=d0b9055939604e4b92977ddbc3e52783&hash=0074C1529DE90C98726B80ED3EE0776C" | tar -xJ && \
mv gcc-arm-* /usr/local/bin && \
printf 'export PATH=$PATH:%s\n' /usr/local/bin/gcc-arm-*/bin >> ~/.bashrc && \
wget -qO- "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz?revision=d0b90559-3960-4e4b-9297-7ddbc3e52783&rev=d0b9055939604e4b92977ddbc3e52783&hash=0074C1529DE90C98726B80ED3EE0776C" \
| tar -xJf - --strip-components=1 -C /usr/local && \
apt-get autoremove && apt-get clean && \
rm -rf ~/.cache /tmp/*
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: ci
on:
merge_group:
push:
branches:
- master
paths-ignore:
- 'releases/*'
pull_request:
branches:
- "**"
paths-ignore:
- 'releases/*'
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: docker/setup-buildx-action@v3
id: buildx
- name: Run docker build for .devcontainer/Dockerfile
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_SUMMARY: false
with:
builder: ${{ steps.buildx.outputs.name }}
file: .devcontainer/Dockerfile
tags: mister-devel/build:stable
load: true
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,scope=${{ github.workflow }},mode=max
- name: Run make MiSTer using devcontainer
run: |
docker run --name=build \
-v $PWD:/usr/src \
-w /usr/src \
mister-devel/build:stable \
make
FILENAME="MiSTer_$(date +'%Y%m%d')"
mv -vi MiSTer "releases/${FILENAME}"
echo "filename=$FILENAME" >>"$GITHUB_OUTPUT"
id: build
- name: "Upload ${{ steps.build.outputs.filename }} Artifact"
uses: actions/upload-artifact@v4
with:
name: "${{ steps.build.outputs.filename }}"
path: "releases/${{ steps.build.outputs.filename }}"
if-no-files-found: error
retention-days: 7