generated from deepin-community/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: no longer q3lcc
- Loading branch information
Showing
112 changed files
with
7,412 additions
and
3,451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[BUG] Short title describing issue" | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Environment(please complete the following information):** | ||
- Operation System: [e.g. Windows, Linux, ...] | ||
- Processor Architecture: [e.g. x86, x86_64, arm7, ...] | ||
- MVDSV Version: [e.g. 0.31, 0.32, custom or specific commit build reference] | ||
- KTX Version: [e.g. 1.37, 1.38, custom or specific commit build reference] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,251 @@ | ||
name: main | ||
|
||
on: | ||
push: | ||
# Only build branches on push, tags will be handled by 'release' job. | ||
branches: | ||
- '**' | ||
pull_request: | ||
workflow_dispatch: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [ linux-amd64, linux-i686, linux-armhf, linux-aarch64, windows-x64, windows-x86, qvm ] | ||
include: | ||
- target: linux-amd64 | ||
os: linux | ||
arch: amd64 | ||
ext: ".so" | ||
packages: [ ] | ||
- target: linux-i686 | ||
os: linux | ||
arch: i686 | ||
ext: ".so" | ||
packages: [ "gcc-i686-linux-gnu" ] | ||
- target: linux-armhf | ||
os: linux | ||
arch: armhf | ||
ext: ".so" | ||
packages: [ "gcc-arm-linux-gnueabihf", "libc6-dev-armhf-cross" ] | ||
- target: linux-aarch64 | ||
os: linux | ||
arch: aarch64 | ||
ext: ".so" | ||
packages: [ "gcc-aarch64-linux-gnu", "libc6-dev-arm64-cross" ] | ||
- target: windows-x64 | ||
os: windows | ||
arch: x64 | ||
ext: ".dll" | ||
packages: [ "gcc-mingw-w64-x86-64" ] | ||
- target: windows-x86 | ||
os: windows | ||
arch: x86 | ||
ext: ".dll" | ||
packages: [ "gcc-mingw-w64-i686" ] | ||
- target: qvm | ||
os: linux | ||
arch: qvm | ||
ext: ".qvm" | ||
packages: [ ] | ||
container: | ||
image: "debian:stable" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ktx | ||
|
||
- name: Prepare Build Environemnt | ||
run: | | ||
apt-get -qq update | ||
apt-get -qq install build-essential cmake ninja-build ${{ join(matrix.packages, ' ') }} | ||
- name: Get number of CPU cores | ||
uses: SimenB/github-actions-cpu-cores@v2 | ||
id: cpu-cores | ||
if: matrix.target == 'qvm' | ||
|
||
- uses: ammaraskar/gcc-problem-matcher@0.3.0 | ||
if: matrix.target != 'qvm' | ||
|
||
- name: Checkout q3lcc | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ec-/q3lcc | ||
path: q3lcc | ||
if: matrix.target == 'qvm' | ||
|
||
- name: Build q3lcc | ||
run: | | ||
make -j ${{ steps.cpu-cores.outputs.count }} PLATFORM=$(uname -s) ARCH=$(uname -m) | ||
mv build*/q3lcc build*/q3rcc build*/q3cpp /usr/local/bin | ||
working-directory: q3lcc | ||
if: matrix.target == 'qvm' | ||
|
||
- name: Build | ||
run: | | ||
./build_cmake.sh ${{ matrix.target }} | ||
mv build/*/qwprogs.* .. | ||
working-directory: ktx | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: qwprogs-${{ matrix.target }} | ||
path: | | ||
qwprogs.* | ||
compression-level: 9 | ||
|
||
verify-macos: | ||
runs-on: macos-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ammaraskar/gcc-problem-matcher@0.3.0 | ||
|
||
- name: Build | ||
run: | | ||
cmake -B builddir -S . -G Xcode -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" | ||
cmake --build builddir --config Release --parallel | ||
verify-msvc: | ||
runs-on: windows-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ammaraskar/msvc-problem-matcher@0.3.0 | ||
|
||
- name: Build | ||
run: | | ||
cmake -B builddir -S . -G "Visual Studio 17 2022" | ||
cmake --build builddir --config Release --parallel | ||
upload: | ||
needs: build | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'QW-Group/ktx' && ((github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'release') | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ktx | ||
|
||
- name: Get release date | ||
run: | | ||
RELEASE_DATE=$(git log -1 --format=%cI "${{ github.ref_name }}") | ||
echo "RELEASE_DATE=$RELEASE_DATE" >> $GITHUB_ENV | ||
working-directory: ktx | ||
|
||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
|
||
- name: Collect GitHub release artifacts | ||
run: | | ||
dist_dir=$(pwd)/dist | ||
mkdir $dist_dir | ||
find qwprogs* -type f -exec sha256sum {} \; > "${dist_dir}/checksums.txt" | ||
# Reset timestamp to time of tag | ||
find qwprogs* -print0 | xargs -0r touch --date="${RELEASE_DATE}" | ||
touch --date="${RELEASE_DATE}" "${dist_dir}/checksums.txt" | ||
for target in qwprogs*; do | ||
(cd $target; zip -o -9 "${dist_dir}/${target}.zip" *) | ||
done | ||
echo "GITHUB_ARTIFACTS=$dist_dir" >> $GITHUB_ENV | ||
if: github.event_name == 'release' | ||
|
||
- name: Attach artifacts to GitHub release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{ env.GITHUB_ARTIFACTS }}/* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: github.event_name == 'release' | ||
|
||
- name: Prepare Upload Environemnt | ||
run: | | ||
sudo apt-get -qq update | ||
sudo apt-get -qq --no-install-recommends install openssh-client | ||
- name: Setup SSH | ||
env: | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
shell: bash | ||
run: | | ||
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | ||
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" | ||
- name: Prepare upload to builds.quakeworld.nu | ||
env: | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
shell: bash | ||
run: | | ||
# Build file structure for uploading | ||
# snapshots: | ||
# upload/snapshots/latest/$os/$arch/$filename | ||
# upload/snapshots/$os/$arch/$prefix_$filename | ||
# releases: | ||
# upload/releases/latest/$os/$arch/$filename | ||
# upload/releases/$tag/$os/$arch/$filename | ||
upload_dir="$(pwd)/upload" | ||
if [[ $GITHUB_REF == refs/tags/* ]]; then | ||
main_dir="${upload_dir}/releases/${{ github.ref_name }}" | ||
latest_dir="${upload_dir}/releases/latest" | ||
prefix="" | ||
else | ||
main_dir="${upload_dir}/snapshots" | ||
latest_dir="${upload_dir}/snapshots/latest" | ||
date=$(TZ="Europe/Amsterdam" date "+%Y%m%d-%H%M%S") | ||
prefix="${date}_${GITHUB_SHA::7}_" | ||
fi | ||
for target in qwprogs*; do | ||
os_arch="${target#qwprogs-}" | ||
os_arch_dir="${os_arch//-//}" | ||
main_target_dir="${main_dir}/${os_arch_dir}" | ||
latest_target_dir="${latest_dir}/${os_arch_dir}" | ||
mkdir -p "${main_target_dir}" "${latest_target_dir}" | ||
for src in $(find "${target}" -type f); do | ||
filename=$(basename "${src}") | ||
cp "${src}" "${main_target_dir}/${prefix}${filename}" | ||
cp "${src}" "${latest_target_dir}/${filename}" | ||
done | ||
(cd "${main_target_dir}" && md5sum * > "${prefix}qwprogs.md5") | ||
(cd "${latest_target_dir}" && md5sum * > "qwprogs.md5") | ||
done | ||
# Reset timestamp to time of tag | ||
find "${upload_dir}" -print0 | xargs -0r touch --date="${RELEASE_DATE}" | ||
echo "Artifacts to upload:" | ||
find upload | ||
echo | ||
- name: Upload to builds.quakeworld.nu/ktx/snapshots | ||
env: | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
shell: bash | ||
run: | | ||
sftp -rp -o 'StrictHostKeyChecking no' -o 'UserKnownHostsFile /dev/null' -P ${{ secrets.SFTP_PORT }} ${{ secrets.SFTP_USERNAME }}@${{ secrets.SFTP_HOST }}:/snapshots <<< $'put -rp upload/snapshots/*' | ||
if: github.event_name == 'push' | ||
|
||
- name: Upload to builds.quakeworld.nu/ktx/releases | ||
env: | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
shell: bash | ||
run: | | ||
sftp -rp -o 'StrictHostKeyChecking no' -o 'UserKnownHostsFile /dev/null' -P ${{ secrets.SFTP_PORT }} ${{ secrets.SFTP_USERNAME }}@${{ secrets.SFTP_HOST }}:/releases <<< $'put -rp upload/releases/*' | ||
if: github.event_name == 'release' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,4 @@ x64/* | |
*.vspx | ||
*.suobackup | ||
*.VC.db | ||
/.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.