Skip to content

Update changelog and version for 0.23.0 release #27

Update changelog and version for 0.23.0 release

Update changelog and version for 0.23.0 release #27

Workflow file for this run

name: Release
on:
push:
tags: '*'
env:
BOOST_VERSION: 1.83.0
CARGO_TERM_COLOR: always
MSVC_CONFIG: RelWithDebInfo
jobs:
create_release:
runs-on: ubuntu-20.04
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
git_tag: ${{ steps.get-git-tag.outputs.name }}
steps:
- name: Get Git tag
id: get-git-tag
run: echo "name=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get-git-tag.outputs.name }}
release_name: libloot v${{ steps.get-git-tag.outputs.name }}
body: |
Requires Windows 7 or later, the MSVC 2019 [x86](https://aka.ms/vs/16/release/vc_redist.x86.exe) or [x64](https://aka.ms/vs/16/release/vc_redist.x64.exe) redistributable for 32-bit and 64-bit builds respectively, and [7-Zip](http://www.7-zip.org/) to extract the archives.
## Change Logs
- [API](https://loot-api.readthedocs.io/en/latest/api/changelog.html)
- [Metadata Syntax](https://loot-api.readthedocs.io/en/latest/metadata/changelog.html)
*Note: The files below with `tar.xz` extensions contain Linux binaries. They won't work on Windows computers.*
linux:
runs-on: ubuntu-20.04
needs: create_release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Download Boost
id: get-boost
run: |
BOOST_BASENAME=boost_${BOOST_VERSION//./_}
wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/${BOOST_BASENAME}.tar.gz
tar -xf ${BOOST_BASENAME}.tar.gz
echo "root=${BOOST_BASENAME}" >> $GITHUB_OUTPUT
- name: Get ICU
id: get-icu
run: |
wget https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-Ubuntu20.04-x64.tgz
tar -xf icu4c-71_1-Ubuntu20.04-x64.tgz
echo "root=${{ github.workspace }}/icu/usr/local" >> $GITHUB_OUTPUT
- name: Install APT package dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-upgrade \
doxygen \
language-pack-el \
language-pack-tr \
libtbb-dev \
g++-10
- name: Run CMake
run: |
mkdir build
cd build
export CXX="g++-10" CC="gcc-10"
cmake .. -DBOOST_ROOT="${{ steps.get-boost.outputs.root }}" -DICU_ROOT="${{ steps.get-icu.outputs.root }}" -DCPACK_PACKAGE_VERSION="${{ needs.create_release.outputs.git_tag }}"
make all
- name: Run tests
run: |
cd build
export LD_LIBRARY_PATH="${{ steps.get-icu.outputs.root }}/lib"
./libloot_internals_tests
./libloot_tests
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install packages for building docs
shell: bash
run: |
pip3 install --user -r docs/requirements.txt
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Build docs
run: sphinx-build -b html docs build/docs/html
- name: Build archive
id: build-archive
shell: bash
run: |
cd build
cpack
echo "filename=libloot-${{ needs.create_release.outputs.git_tag }}-Linux.tar.xz" >> $GITHUB_OUTPUT
- name: Upload Archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: build/package/${{ steps.build-archive.outputs.filename }}
asset_name: ${{ steps.build-archive.outputs.filename }}
asset_content_type: application/octet-stream
windows:
runs-on: windows-2019
needs: create_release
strategy:
matrix:
platform: [Win32, x64]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust i686-pc-windows-msvc target
run: rustup target add i686-pc-windows-msvc
- name: Download Boost
id: get-boost
run: |
$BOOST_BASENAME="boost_" + $env:BOOST_VERSION -replace "\.", "_"
curl -sSfLO "https://boostorg.jfrog.io/artifactory/main/release/${env:BOOST_VERSION}/source/${BOOST_BASENAME}.7z"
7z x "${BOOST_BASENAME}.7z"
echo "root=$BOOST_BASENAME" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
- name: Run CMake
run: |
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A ${{ matrix.platform }} -DBOOST_ROOT="${{ steps.get-boost.outputs.root }}" -DCPACK_PACKAGE_VERSION="${{ needs.create_release.outputs.git_tag }}"
cmake --build . --config ${{ env.MSVC_CONFIG }}
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install packages for building docs
run: |
nuget install doxygen -Version 1.8.14
echo "${{ github.workspace }}\Doxygen.1.8.14\tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
python -m pip install -r docs/requirements.txt
- name: Build docs
run: sphinx-build -b html docs build\docs\html
- name: Build archive
id: build-archive
shell: bash
run: |
cd build
cpack -C ${{ env.MSVC_CONFIG }}
if [[ "${{ matrix.platform }}" == "Win32" ]]
then
PLATFORM=win32
else
PLATFORM=win64
fi
echo "filename=libloot-${{ needs.create_release.outputs.git_tag }}-${PLATFORM}.7z" >> $GITHUB_OUTPUT
- name: Upload Archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: build/package/${{ steps.build-archive.outputs.filename }}
asset_name: ${{ steps.build-archive.outputs.filename }}
asset_content_type: application/x-7z-compressed