Add Starfield's My Games path as an additional data path #372
Workflow file for this run
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
name: CI | |
on: | |
push: | |
# Don't run this workflow when a tag is pushed. | |
branches: | |
- '*' | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
MSVC_CONFIG: RelWithDebInfo | |
jobs: | |
linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Cache cargo | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Get descriptive libloot version | |
id: get-libloot-version | |
shell: bash | |
run: | | |
GIT_DESCRIBE=$(git describe --tags --long --abbrev=7) | |
LIBLOOT_DESC_REF=${GIT_DESCRIBE}_${GITHUB_REF#refs/*/} | |
LIBLOOT_SAFE_DESC_REF=${LIBLOOT_DESC_REF//[\/<>\"|]/_} | |
echo "version=$LIBLOOT_SAFE_DESC_REF" >> $GITHUB_OUTPUT | |
- name: Download Boost | |
run: | | |
wget https://boostorg.jfrog.io/artifactory/main/release//1.81.0/source/boost_1_81_0.tar.gz | |
tar -xf boost_1_81_0.tar.gz | |
- 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 \ | |
libicu-dev \ | |
libtbb-dev \ | |
g++-10 | |
- name: Run CMake | |
run: | | |
mkdir build | |
cd build | |
export CXX="g++-10" CC="gcc-10" | |
cmake .. -DBOOST_ROOT="boost_1_81_0" -DICU_ROOT="${{ steps.get-icu.outputs.root }}" -DCPACK_PACKAGE_VERSION="${{ steps.get-libloot-version.outputs.version }}" | |
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@v4 | |
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 | |
VERSION="${{ steps.get-libloot-version.outputs.version }}" | |
echo "filename=libloot-${VERSION}-Linux.tar.xz" >> $GITHUB_OUTPUT | |
- name: Import GPG key | |
run: echo -n "${{ secrets.GPG_SIGNING_KEY }}" | gpg --import | |
if: github.event_name == 'push' | |
- name: Sign archive | |
run: gpg --output "build/package/${{ steps.build-archive.outputs.filename }}.sig" --detach-sig "build/package/${{ steps.build-archive.outputs.filename }}" | |
if: github.event_name == 'push' | |
- name: Upload archive | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.build-archive.outputs.filename }} | |
path: | | |
build/package/${{ steps.build-archive.outputs.filename }} | |
build/package/${{ steps.build-archive.outputs.filename }}.sig | |
if: github.event_name == 'push' | |
windows: | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
platform: [Win32, x64] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Cache cargo | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
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 | |
run: | | |
curl -sSfLO https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.7z | |
7z x boost_1_81_0.7z | |
- name: Get descriptive libloot version | |
id: get-libloot-version | |
shell: bash | |
run: | | |
GIT_DESCRIBE=$(git describe --tags --long --abbrev=7) | |
LIBLOOT_DESC_REF=${GIT_DESCRIBE}_${GITHUB_REF#refs/*/} | |
LIBLOOT_SAFE_DESC_REF=${LIBLOOT_DESC_REF//[\/<>\"|]/_} | |
echo "version=$LIBLOOT_SAFE_DESC_REF" >> $GITHUB_OUTPUT | |
- name: Run CMake | |
run: | | |
mkdir build | |
cd build | |
cmake .. -G "Visual Studio 16 2019" -A ${{ matrix.platform }} -DBOOST_ROOT="boost_1_81_0" -DCPACK_PACKAGE_VERSION="${{ steps.get-libloot-version.outputs.version }}" | |
cmake --build . --config ${{ env.MSVC_CONFIG }} | |
- name: Run tests | |
run: | | |
cd build/${{ env.MSVC_CONFIG }} | |
.\libloot_internals_tests.exe | |
.\libloot_tests.exe | |
- uses: actions/setup-python@v4 | |
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 }} | |
VERSION="${{ steps.get-libloot-version.outputs.version }}" | |
if [[ "${{ matrix.platform }}" == "Win32" ]] | |
then | |
PLATFORM=win32 | |
else | |
PLATFORM=win64 | |
fi | |
echo "filename=libloot-${VERSION}-${PLATFORM}.7z" >> $GITHUB_OUTPUT | |
- name: Import GPG key | |
run: echo -n "${{ secrets.GPG_SIGNING_KEY }}" | gpg --import | |
if: github.event_name == 'push' | |
- name: Sign archive | |
run: gpg --output "build/package/${{ steps.build-archive.outputs.filename }}.sig" --detach-sig "build/package/${{ steps.build-archive.outputs.filename }}" | |
if: github.event_name == 'push' | |
- name: Upload archive | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.build-archive.outputs.filename }} | |
path: | | |
build/package/${{ steps.build-archive.outputs.filename }} | |
build/package/${{ steps.build-archive.outputs.filename }}.sig | |
if: github.event_name == 'push' |