Skip to content

build(deps): bump actions/checkout from 6 to 7 #143

build(deps): bump actions/checkout from 6 to 7

build(deps): bump actions/checkout from 6 to 7 #143

Workflow file for this run

name: Build Test
on:
push:
pull_request:
workflow_call:
inputs:
optimize:
description: 'Create optimized release artifacts'
required: false
default: false
type: boolean
jobs:
get-version:
name: Determine revision number
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
version-numeric: ${{ steps.version.outputs.version-numeric }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Determine revision number
id: version
run: |
git_commit=$(git rev-parse --short HEAD)
git_current_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo v0.0.0)
git_commit_no=$(git rev-list --count "${git_current_tag}..HEAD" 2>/dev/null || git rev-list --count HEAD)
VERSION=${git_current_tag#v}; VERSION=${VERSION//-/.}
VERSION_NUMERIC=$(echo "${git_current_tag}" | sed 's/^v//;s/[^0-9.].*//')
if [ "$git_commit_no" -gt 0 ]; then
VERSION+="+git$git_commit_no"
fi
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "version-numeric=${VERSION_NUMERIC}" >> $GITHUB_OUTPUT
build-debian-testing:
name: Debian Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Create Build Environment
run: cd tests/ci/ && podman build -t omerewriter -f ./Dockerfile-debian-testing .
- name: Build & Test
run: podman run -t -e CC=gcc -e CXX=g++ -e CMAKE_BUILD_TYPE=${{ inputs.optimize && 'Release' || 'Debug' }} -v `pwd`:/build omerewriter
./tests/ci/build-and-test.sh
build-ubuntu-lts:
name: Ubuntu LTS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Create Build Environment
run: cd tests/ci/ && podman build -t omerewriter -f ./Dockerfile-ubuntu-lts .
- name: Build & Test
run: podman run -t -e CC=gcc -e CXX=g++ -e CMAKE_BUILD_TYPE=${{ inputs.optimize && 'Release' || 'Debug' }} -v `pwd`:/build omerewriter
./tests/ci/build-and-test.sh
build-windows:
name: Windows
runs-on: windows-latest
needs: get-version
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v7
- uses: msys2/setup-msys2@v2
with:
msystem: ucrt64
update: true
pacboy: >-
git
cmake
ninja
gcc:p
appstream:p
python
python-pip:p
qt6-base:p
qt6-5compat:p
qt6-svg:p
gtest:p
fmt:p
spdlog:p
boost:p
libtiff:p
libpng:p
librsvg:p
icoutils:p
- name: Set up Python venv
run: |
python -m venv venv
./venv/bin/python -m pip install -U pip
# Persist for later steps
cat > .msys2_env <<'EOF'
export VIRTUAL_ENV="$GITHUB_WORKSPACE/venv"
export PATH="$VIRTUAL_ENV/bin:$PATH"
EOF
echo "BASH_ENV=$(cygpath -w "$PWD/.msys2_env")" >> "$GITHUB_ENV"
- name: Install Python packages
run: pip install six genshi
- name: Configure
run: |
cmake -GNinja -Bbuild \
-DCMAKE_BUILD_TYPE=${{ inputs.optimize && 'Release' || 'RelWithDebInfo' }} \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/install/OMERewriter" \
-DPython3_EXECUTABLE="$(cygpath -w "$PWD/venv/bin/python")" \
-DPython3_FIND_VIRTUALENV=FIRST
touch CMakeLists.txt
- name: Build
run: cmake --build build
- name: Install & Bundle
run: |
cmake --build build --target install
cd $GITHUB_WORKSPACE
DEPLOY_DIR=$GITHUB_WORKSPACE/install/OMERewriter
windeployqt \
--no-quick-import \
--no-translations \
$DEPLOY_DIR/bin/OMERewriter.exe
# Copy DLLs
ldd $DEPLOY_DIR/bin/OMERewriter.exe \
| awk '/\/ucrt64\/bin/ { print $3 }' \
| while read -r dll; do
install -v -p "$dll" $DEPLOY_DIR/bin/
done
# Misc
cp LICENSE.LGPL-3.0 $DEPLOY_DIR/LICENSE.txt
cp README.md $DEPLOY_DIR/
cp NEWS.md $DEPLOY_DIR/
# Cleanup
rm -rf $DEPLOY_DIR/cmake
rm -rf $DEPLOY_DIR/include
rm -rf $DEPLOY_DIR/libexec
find $DEPLOY_DIR/lib/ -maxdepth 1 -type f -name '*.a' -delete
- name: Build installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.8
with:
path: data/win-installer.iss
options: |-
/DAppVersion=${{ needs.get-version.outputs.version-numeric }}
/DAppVersionNumeric=${{ needs.get-version.outputs.version-numeric }}
/DDeployDir=..\install\OMERewriter
- name: Upload installer
uses: actions/upload-artifact@v7
with:
name: OMERewriter-${{ needs.get-version.outputs.version-numeric }}_setup_win64
path: data/output/OMERewriter-*_Setup.exe
- name: Upload portable ZIP
uses: actions/upload-artifact@v7
with:
name: OMERewriter-${{ needs.get-version.outputs.version-numeric }}_win64
path: install/