Merge commit '369983846a82bdd87e911bdd940ec49f3316c6ac' into HEAD
This commit is contained in:
36
.github/changelog.py
vendored
Normal file
36
.github/changelog.py
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import sys
|
||||
|
||||
"""
|
||||
This script assumes changelogs use the following format:
|
||||
## <major>.x (eg. "## 15.x") to indicate a major version series
|
||||
### <major>.<minor>[-<suffix>] <date etc> (eg. "## 15.0 (2025-04-01)", "### 15.1-beta1 (2024-12-25)") to indicate an individual version
|
||||
"""
|
||||
|
||||
def main():
|
||||
current_version = sys.argv[1]
|
||||
stable_version = current_version.split("-")[0]
|
||||
major_version = current_version.split(".")[0]
|
||||
# set when current version is found
|
||||
current_found = False
|
||||
|
||||
with open("changelog.md", "r") as file:
|
||||
for line in file:
|
||||
if line.startswith("### "):
|
||||
if not line.startswith(f"### {current_version} ") and not current_found:
|
||||
# First version in changelog should be the current one
|
||||
sys.stderr.write(f"Changelog doesn't start with current version ({current_version})\n")
|
||||
sys.exit(1)
|
||||
if not line.startswith(f"### {stable_version}"):
|
||||
# Reached a previous stable version
|
||||
break
|
||||
if line.startswith(f"### {current_version} "):
|
||||
current_found = True
|
||||
elif line.startswith("## "):
|
||||
if not line.startswith(f"## {major_version}.x"):
|
||||
# Reached a previous major version
|
||||
break
|
||||
|
||||
print(line.rstrip())
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
16
.github/changelog.sh
vendored
16
.github/changelog.sh
vendored
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
tag=$(git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed 's@\^0$@@')
|
||||
|
||||
# If we are a tag, show the part of the changelog till (but excluding) the last stable
|
||||
if [ -n "$tag" ]; then
|
||||
grep='^[0-9]\+\.[0-9]\+[^-]'
|
||||
next=$(cat changelog.md | grep '^[0-9]' | awk 'BEGIN { show="false" } // { if (show=="true") print $0; if ($1=="'$tag'") show="true"} ' | grep "$grep" | head -n1 | sed 's/ .*//')
|
||||
cat changelog.md | awk 'BEGIN { show="false" } /^[0-9]+.[0-9]+/ { if ($1=="'$next'") show="false"; if ($1=="'$tag'") show="true";} // { if (show=="true") print $0 }'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# In all other cases, show the git log of the last 7 days
|
||||
revdate=$(git log -1 --pretty=format:"%ci")
|
||||
last_week=$(date -d "$revdate -7days" +"%Y-%m-%d %H:%M")
|
||||
git log --after="${last_week}" --pretty=fuller
|
||||
12
.github/workflows/ci-emscripten.yml
vendored
12
.github/workflows/ci-emscripten.yml
vendored
@@ -12,7 +12,8 @@ jobs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
# If you change this version, change the number in the cache step too.
|
||||
# If you change this version, change the numbers in the cache step,
|
||||
# .github/workflows/preview-build.yml (2x) and os/emscripten/Dockerfile too.
|
||||
image: emscripten/emsdk:3.1.57
|
||||
|
||||
steps:
|
||||
@@ -23,9 +24,18 @@ jobs:
|
||||
run: |
|
||||
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||
|
||||
- name: Update to modern GCC
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y gcc-12 g++-12
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
|
||||
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
|
||||
|
||||
- name: Setup cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
# If you change this version, change the numbers in the image configuration step,
|
||||
# .github/workflows/preview-build.yml (2x) and os/emscripten/Dockerfile too.
|
||||
path: /emsdk/upstream/emscripten/cache
|
||||
key: 3.1.57-${{ runner.os }}
|
||||
|
||||
|
||||
22
.github/workflows/ci-nightly.yml
vendored
22
.github/workflows/ci-nightly.yml
vendored
@@ -9,27 +9,6 @@ env:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: GCC - SDL1.2
|
||||
compiler: gcc
|
||||
cxxcompiler: g++
|
||||
libraries: libsdl1.2-dev
|
||||
|
||||
name: Linux (${{ matrix.name }})
|
||||
|
||||
uses: ./.github/workflows/ci-linux.yml
|
||||
secrets: inherit
|
||||
|
||||
with:
|
||||
compiler: ${{ matrix.compiler }}
|
||||
cxxcompiler: ${{ matrix.cxxcompiler }}
|
||||
libraries: ${{ matrix.libraries }}
|
||||
extra-cmake-parameters:
|
||||
|
||||
macos:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -69,7 +48,6 @@ jobs:
|
||||
check_annotations:
|
||||
name: Check Annotations
|
||||
needs:
|
||||
- linux
|
||||
- macos
|
||||
- mingw
|
||||
|
||||
|
||||
1
.github/workflows/codeql.yml
vendored
1
.github/workflows/codeql.yml
vendored
@@ -87,6 +87,7 @@ jobs:
|
||||
with:
|
||||
languages: cpp
|
||||
config-file: ./.github/codeql/codeql-config.yml
|
||||
trap-caching: false
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
|
||||
12
.github/workflows/preview-build.yml
vendored
12
.github/workflows/preview-build.yml
vendored
@@ -20,7 +20,8 @@ jobs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
# If you change this version, change the number in the cache step too.
|
||||
# If you change this version, change the numbers in the cache step,
|
||||
# .github/workflows/ci-emscripten.yml (2x) and os/emscripten/Dockerfile too.
|
||||
image: emscripten/emsdk:3.1.57
|
||||
|
||||
steps:
|
||||
@@ -34,10 +35,19 @@ jobs:
|
||||
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||
git checkout -b pr${{ github.event.pull_request.number }}
|
||||
|
||||
- name: Update to modern GCC
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y gcc-12 g++-12
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
|
||||
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
|
||||
|
||||
- name: Setup cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /emsdk/upstream/emscripten/cache
|
||||
# If you change this version, change the numbers in the image configuration step,
|
||||
# .github/workflows/ci-emscripten.yml (2x) and os/emscripten/Dockerfile too.
|
||||
key: 3.1.57-${{ runner.os }}
|
||||
|
||||
- name: Add liblzma support
|
||||
|
||||
19
.github/workflows/rebase-checker.yml
vendored
Normal file
19
.github/workflows/rebase-checker.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: "Update 'work: needs rebase' label status"
|
||||
on:
|
||||
# So that PRs touching the same files as the push are updated
|
||||
push:
|
||||
# So that the `dirtyLabel` is removed if conflicts are resolve
|
||||
# We recommend `pull_request_target` so that github secrets are available.
|
||||
# In `pull_request` we wouldn't be able to change labels of fork PRs
|
||||
pull_request_target:
|
||||
types: [synchronize]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check if prs are in need of a rebase
|
||||
uses: eps1lon/actions-label-merge-conflict@v3
|
||||
with:
|
||||
dirtyLabel: "work: needs rebase"
|
||||
repoToken: "${{ secrets.GITHUB_TOKEN }}"
|
||||
6
.github/workflows/release-linux.yml
vendored
6
.github/workflows/release-linux.yml
vendored
@@ -71,10 +71,10 @@ jobs:
|
||||
# dependencies as possible. We do it before anything else is installed,
|
||||
# to make sure it doesn't pick up on any of the drivers.
|
||||
echo "::group::Install fluidsynth"
|
||||
wget https://github.com/FluidSynth/fluidsynth/archive/v2.3.3.tar.gz
|
||||
tar xf v2.3.3.tar.gz
|
||||
wget https://github.com/FluidSynth/fluidsynth/archive/v2.4.4.tar.gz
|
||||
tar xf v2.4.4.tar.gz
|
||||
(
|
||||
cd fluidsynth-2.3.3
|
||||
cd fluidsynth-2.4.4
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
|
||||
|
||||
11
.github/workflows/release-source.yml
vendored
11
.github/workflows/release-source.yml
vendored
@@ -90,10 +90,10 @@ jobs:
|
||||
|
||||
- name: Generate metadata
|
||||
id: metadata
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::group::Prepare metadata files"
|
||||
cmake -DGENERATE_OTTDREV=1 -P cmake/scripts/FindVersion.cmake
|
||||
./.github/changelog.sh > .changelog
|
||||
TZ='UTC' date +"%Y-%m-%d %H:%M UTC" > .release_date
|
||||
cat .ottdrev | cut -f 1 -d$'\t' > .version
|
||||
|
||||
@@ -103,6 +103,8 @@ jobs:
|
||||
|
||||
FOLDER="${{ env.FOLDER_RELEASES }}"
|
||||
TRIGGER_TYPE="new-tag"
|
||||
|
||||
python3 ./.github/changelog.py "$(cat .version)" > .changelog
|
||||
else
|
||||
IS_TAG="false"
|
||||
|
||||
@@ -124,6 +126,13 @@ jobs:
|
||||
FOLDER="${{ env.FOLDER_BRANCHES }}/${BRANCH}"
|
||||
TRIGGER_TYPE="new-branch"
|
||||
fi
|
||||
|
||||
# For nightlies / branches, use the git log of the last 7 days as changelog.
|
||||
revdate=$(git log -1 --pretty=format:"%ci")
|
||||
last_week=$(date -d "$revdate -7days" +"%Y-%m-%d %H:%M")
|
||||
echo "## Version $(cat .version) - changes since ${last_week}" > .changelog
|
||||
echo "" >> .changelog
|
||||
git log --oneline --after="${last_week}" >> .changelog
|
||||
fi
|
||||
|
||||
mkdir -p build/bundles
|
||||
|
||||
3
.github/workflows/upload-gog.yml
vendored
3
.github/workflows/upload-gog.yml
vendored
@@ -62,9 +62,10 @@ jobs:
|
||||
|
||||
echo "::group::Unpack OpenGFX"
|
||||
unzip opengfx-all.zip
|
||||
tar xf opengfx-*.tar
|
||||
echo "::endgroup::"
|
||||
|
||||
rm -f opengfx-all.zip
|
||||
rm -f opengfx-all.zip opengfx-*.tar
|
||||
|
||||
- name: Install OpenMSX
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user