1
0
forked from 0ad/0ad

Run checkrefs.py as Gitea Actions workflow

This commit is contained in:
Dunedan 2024-08-26 09:39:37 +02:00 committed by Nicolas Auvray
parent 183a0b13f3
commit f8ac0e4f68
3 changed files with 20 additions and 58 deletions

View File

@ -0,0 +1,20 @@
---
name: checkrefs
on:
- push
- pull_request
jobs:
checkrefs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install lxml
run: pip3 install lxml
- name: Workaround for authentication problem with LFS
# https://gitea.com/gitea/act_runner/issues/164
run: git config --local http.${{ gitea.server_url }}/${{ gitea.repository }}.git/info/lfs/objects/.extraheader ''
- name: Download necessary LFS assets
run: git lfs pull -I binaries/data/mods/public/maps
- name: Check for missing references
run: ./source/tools/entity/checkrefs.py

View File

@ -1,13 +0,0 @@
FROM python:3.12-slim-bookworm
ARG DEBIAN_FRONTEND=noninteractive
ARG DEBCONF_NOWARNINGS="yes"
RUN apt -qq update && apt install -qqy --no-install-recommends \
git \
git-lfs \
subversion \
&& apt clean
RUN git lfs install --system --skip-smudge
RUN pip3 install --upgrade lxml

View File

@ -1,45 +0,0 @@
/* Copyright (C) 2024 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* 0 A.D. is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
// This pipeline runs source/tools/entity/checkrefs.py to identify
// mistakes and oversights in references to game content (assets,
// templates, etc).
pipeline {
agent {
dockerfile {
label 'LinuxAgent'
customWorkspace 'workspace/checkrefs'
dir 'build/jenkins/dockerfiles'
filename 'tools.Dockerfile'
}
}
stages {
stage("Asset download") {
steps {
sh "git lfs pull -I binaries/data/mods/public/maps"
}
}
stage("Data checks") {
steps {
sh "python3 source/tools/entity/checkrefs.py -tax"
}
}
}
}