Skip to content
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
91 changes: 56 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,68 @@
name: Build
name: Build Progs Artifacts
on:
workflow_dispatch:
inputs:
reason:
description: "Reason for running"
required: false
default: "Manual check"
push:

jobs:
build:

build-artifacts:
runs-on: ubuntu-latest

steps:

- name: Checkout
- name: Checkout Repository
uses: actions/checkout@v4
with:
# Create partial clone
# See: https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt---filterfilter-spec
filter: blob:none
submodules: false
fetch-depth: 0
fetch-tags: true

- name: Initialize xonotic submodule
# Create a small clone, with full history to improve workflow speed.
# For example, original size of xonotic-data.pk3dir is ~4GB
# with: git submodules update --init --filter=blob:none xonotic
# The size is reduced to ~700MB
# https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt---filterfilter-spec
run: git submodule update --init --filter=blob:none xonotic

- name: Get gmqcc Commit ID
id: get-gmqcc-commit-id
run: echo "GMQCC_SHA=$(git rev-parse :gmqcc)" >> "$GITHUB_OUTPUT"

- name: Cache gmqcc Binary
id: cache-gmqcc
uses: actions/cache@v4
with:
path: gmqcc/gmqcc
key: ${{ runner.os }}-gmqcc-bin-${{ steps.get-gmqcc-commit-id.outputs.GMQCC_SHA }}

- if: steps.cache-gmqcc.outputs.cache-hit != 'true'
name: Initialize gmqcc submodule
run: git submodule update --init --filter=blob:none gmqcc

- if: steps.cache-gmqcc.outputs.cache-hit != 'true'
name: Compile gmqcc Binary
run: make -C gmqcc -j$(nproc)

- name: Build Progs
run: ./build.sh -a

- name: Prepare
run: ./update.sh
env:
CI: true
ARCHIVE: 1

- name: Build
run: ./build.sh
env:
TERM: xterm
ARCHIVE: 1

- name: Set artifact name
- name: Generate Artifact Name
run: |
git fetch --tags
echo "ARTIFACT_NAME=progs-$(git describe --tags --dirty='~' --always)" >> $GITHUB_ENV
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
VERSION_TAG=$(git describe --tags --dirty="~" --always)
echo "CURRENT_BRANCH=${CURRENT_BRANCH}" >> "$GITHUB_ENV"
echo "VERSION_TAG=${VERSION_TAG}" >> "$GITHUB_ENV"
echo "ARTIFACT_NAME=progs-${CURRENT_BRANCH}-${VERSION_TAG}" >> "$GITHUB_ENV"

- name: Store artifacts
uses: actions/upload-artifact@v4
# Upload the files in build folder
- name: Upload Artifacts
uses: actions/upload-artifact@v7
with:
name: ${{ env.ARTIFACT_NAME }}
path: |
compiled/*
if-no-files-found: error
# retention-days: 14

- name: Publish a release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
files: |
compiled/*
path: build/${{ env.CURRENT_BRANCH }}
79 changes: 60 additions & 19 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,72 @@
name: QC Master Daily
name: Test Build Against QC Master Daily
on:
schedule:
- cron: '19 0 * * *'
- cron: "19 0 * * *"
workflow_dispatch:
inputs:
reason:
description: "Reason for Running"
required: false
default: "Manual Check"

jobs:
qc-master-daily:

test-build-artifacts:
runs-on: ubuntu-latest

steps:

- name: Checkout
- name: Checkout Repository
uses: actions/checkout@v4
with:
# Create partial clone
# See: https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt---filterfilter-spec
filter: blob:none
submodules: false
fetch-depth: 0
fetch-tags: true

- name: Prepare
run: ./update.sh
env:
CI: true
ARCHIVE: 1

- name: Checkout xonotic-data master
- name: Initialize xonotic submodule
# Create a small clone, with full history to improve workflow speed.
# For example, original size of xonotic-data.pk3dir is ~4GB
# with: git submodules update --init --filter=blob:none xonotic
# The size is reduced to ~700MB
# https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt---filterfilter-spec
run: |
git submodule update --init --filter=blob:none xonotic
git -C xonotic checkout master
git -C xonotic pull origin master

- name: Get gmqcc Commit ID
id: get-gmqcc-commit-id
run: echo "GMQCC_SHA=$(git rev-parse :gmqcc)" >> "$GITHUB_OUTPUT"

- name: Cache gmqcc Binary
id: cache-gmqcc
uses: actions/cache@v4
with:
path: gmqcc/gmqcc
key: ${{ runner.os }}-gmqcc-bin-${{ steps.get-gmqcc-commit-id.outputs.GMQCC_SHA }}

- if: steps.cache-gmqcc.outputs.cache-hit != 'true'
name: Initialize gmqcc submodule
run: git submodule update --init --filter=blob:none gmqcc

- if: steps.cache-gmqcc.outputs.cache-hit != 'true'
name: Compile gmqcc Binary
run: make -C gmqcc -j$(nproc)

- name: Build Progs
run: ./build.sh -a

- name: Build
run: ./build.sh
env:
TERM: xterm
ARCHIVE: 1
# - name: Generate Artifact Name
# run: |
# CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
# VERSION_TAG=$(git describe --tags --dirty="~" --always)
# echo "CURRENT_BRANCH=${CURRENT_BRANCH}" >> "$GITHUB_ENV"
# echo "VERSION_TAG=${VERSION_TAG}" >> "$GITHUB_ENV"
# echo "ARTIFACT_NAME=progs-${CURRENT_BRANCH}-${VERSION_TAG}" >> "$GITHUB_ENV"
#
# # Upload the files in build folder
# - name: Upload Artifacts
# uses: actions/upload-artifact@v7
# with:
# name: ${{ env.ARTIFACT_NAME }}
# path: build/${{ env.CURRENT_BRANCH }}
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
compiled/
gmqcc/
*.dat
*.lno
build/
.cache/
.DS_Store
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
path = xonotic
url = https://gitlab.com/smbxon/xonotic-data.pk3dir.git
branch = main
[submodule "gmqcc"]
path = gmqcc
url = https://gitlab.com/xonotic/gmqcc.git
Loading