remove Makefile, simplify CI to single job calling python scripts directly
This commit is contained in:
47
.github/workflows/ci.yml
vendored
47
.github/workflows/ci.yml
vendored
@@ -7,8 +7,8 @@ on:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate
|
||||
ci:
|
||||
name: Validate, Test, Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -17,43 +17,26 @@ jobs:
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Validate applications.json
|
||||
run: make validate
|
||||
- name: Validate
|
||||
run: python scripts/validate-json.py src/applications.json
|
||||
|
||||
test:
|
||||
name: Live Test
|
||||
runs-on: ubuntu-latest
|
||||
needs: validate
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Test app configs resolve to APKs
|
||||
- name: Test
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: make test
|
||||
run: python scripts/test-apps.py
|
||||
|
||||
check-generated:
|
||||
name: Check Generated Files
|
||||
runs-on: ubuntu-latest
|
||||
needs: validate
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Generate
|
||||
run: |
|
||||
python scripts/normalize-json.py src/applications.json
|
||||
python scripts/generate-table.py src/applications.json ./pages/table.md
|
||||
python scripts/generate-readme.py ./pages/header.md ./pages/table.md ./pages/faq.md ./pages/footer.md
|
||||
python scripts/minify-json.py src/applications.json obtainium-emulation-pack-latest.json --variant standard
|
||||
python scripts/minify-json.py src/applications.json obtainium-emulation-pack-dual-screen-latest.json --variant dual-screen
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Run make build
|
||||
run: make build
|
||||
|
||||
- name: Check for uncommitted changes
|
||||
- name: Check generated files are up to date
|
||||
run: |
|
||||
if [ -n "$(git diff --name-only)" ]; then
|
||||
echo "Generated files are out of date. Run 'make build' and commit the results."
|
||||
echo "Generated files are out of date. Run 'just build' and commit the results."
|
||||
echo ""
|
||||
echo "Changed files:"
|
||||
git diff --name-only
|
||||
|
||||
39
Makefile
39
Makefile
@@ -1,39 +0,0 @@
|
||||
# These targets exist for CI (GitHub Actions) only.
|
||||
# For local development, use the justfile: run `just` to see all commands.
|
||||
|
||||
.PHONY: help validate test build normalize table readme minify minify-dual-screen
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
help: ## Show available targets
|
||||
@echo "CI-only build targets. For local development, run 'just' to see all commands."
|
||||
@echo ""
|
||||
@grep -E '^[a-z].*:.*##' Makefile | sed 's/:.*## /\t/' | while IFS=$$'\t' read -r target desc; do \
|
||||
printf "\033[1;32m%-20s\033[0m %s\n" "$$target" "$$desc"; \
|
||||
done
|
||||
|
||||
validate: ## Validate applications.json for errors
|
||||
@python scripts/validate-json.py src/applications.json
|
||||
|
||||
test: ## Live-test all app configs resolve to downloadable APKs
|
||||
@python scripts/test-apps.py
|
||||
|
||||
build: validate normalize readme minify minify-dual-screen ## Build all artifacts
|
||||
|
||||
normalize: ## Normalize key order and add missing defaults
|
||||
@python scripts/normalize-json.py src/applications.json
|
||||
|
||||
table: ## Generate markdown table for the README
|
||||
@python scripts/generate-table.py src/applications.json ./pages/table.md
|
||||
|
||||
readme: table ## Generate the README from page sections
|
||||
@python scripts/generate-readme.py \
|
||||
./pages/header.md \
|
||||
./pages/table.md \
|
||||
./pages/faq.md \
|
||||
./pages/footer.md
|
||||
|
||||
minify: ## Generate standard release JSON
|
||||
@python scripts/minify-json.py src/applications.json obtainium-emulation-pack-latest.json --variant standard
|
||||
|
||||
minify-dual-screen: ## Generate dual-screen release JSON
|
||||
@python scripts/minify-json.py src/applications.json obtainium-emulation-pack-dual-screen-latest.json --variant dual-screen
|
||||
Reference in New Issue
Block a user