mirror of
https://github.com/MoHadiShibli/Control4Free.git
synced 2026-10-06 10:00:28 +02:00
- README: what Control4Free is and why it reaches menus and sign-in, features, a quick start, screenshots, requirements, limitations, credits. - docs/: installation, playing, troubleshooting (every message the page and the app can show), how it works, and the WebSocket protocol. - CONTRIBUTING.md: building, testing, code style, releasing. - Screenshots of the page on phones and a PC and of the app, made against the real service built for the host, at the example address 192.168.1.20. - Issue forms, a contact list pointing at the guides and private security reporting, and FUNDING.yml. - CHANGELOG.md dated. CI now publishes this version's section of it as the release notes rather than the whole file. - THIRD_PARTY.md: the DualShock 4 diagram the buttons are drawn after (CC BY 3.0), and Apollo Save Tool for the package settings. - Page: the Vibration setting no longer promises to buzz when a game rumbles, which 1.0.0 cannot do yet.
65 lines
2.3 KiB
YAML
65 lines
2.3 KiB
YAML
name: build
|
|
|
|
# Builds both toolchain images, the payload, the installable package, and runs
|
|
# every host test. On a vX.Y.Z tag it also publishes the release.
|
|
on:
|
|
push:
|
|
branches: [main, next]
|
|
tags: ['v*']
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write # the release step needs it; nothing else writes
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build the toolchain images
|
|
run: |
|
|
docker build -t control4free-build -f docker/Dockerfile docker
|
|
docker build -t control4free-launcher-build -f docker/Dockerfile.launcher docker
|
|
|
|
- name: Build the payload and the package
|
|
run: |
|
|
docker run --rm --network none -v "$PWD:/src" -w /src \
|
|
control4free-launcher-build bash -lc 'make && make -C launcher'
|
|
|
|
- name: Host tests
|
|
run: |
|
|
docker run --rm --network none -v "$PWD:/src" -w /src \
|
|
control4free-launcher-build python3 -B tests/run.py
|
|
|
|
- name: Collect what was built
|
|
run: |
|
|
version=$(cat VERSION)
|
|
mkdir -p artifacts
|
|
cp build/control4free.elf "build/Control4Free-$version.pkg" artifacts/
|
|
cd artifacts && sha256sum * > SHA256SUMS && cat SHA256SUMS
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: control4free
|
|
path: artifacts/
|
|
if-no-files-found: error
|
|
|
|
- name: Check the tag matches VERSION
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
run: |
|
|
test "v$(cat VERSION)" = "${GITHUB_REF#refs/tags/}" \
|
|
|| { echo "tag ${GITHUB_REF#refs/tags/} does not match VERSION $(cat VERSION)"; exit 1; }
|
|
|
|
- name: Publish the release
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
# The release notes are this version's section of the changelog.
|
|
version=$(cat VERSION)
|
|
awk -v head="## $version " 'index($0, head) == 1 { keep = 1; next } /^## / { keep = 0 } keep' CHANGELOG.md > notes.md
|
|
test -s notes.md || { echo "CHANGELOG.md has no section for $version"; exit 1; }
|
|
gh release create "${GITHUB_REF#refs/tags/}" artifacts/* --verify-tag --title "Control4Free $version" --notes-file notes.md
|