Skip to content

Fix missed label conversion #469

Fix missed label conversion

Fix missed label conversion #469

Workflow file for this run

name: CMake
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest ]
platform: [ x64, x86 ]
exclude:
- os: macos-latest
platform: x86
steps:
- uses: actions/checkout@v4
- name: Set environment variables (x86|Ubuntu)
shell: bash
run: |
echo "CFLAGS=-m32" >> $GITHUB_ENV
echo "CXXFLAGS=-m32" >> $GITHUB_ENV
if: matrix.platform == 'x86' && matrix.os == 'ubuntu-latest'
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install python packages
run: |
python -m pip install --upgrade pip
python -m pip install beautifulsoup4 mistune
- name: Setup compilers
run: |
sudo apt update
sudo apt install gcc-11 g++-11
sudo apt install gcc-11-multilib g++-11-multilib
shell: bash
if: matrix.os == 'ubuntu-latest'
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake (x86|Windows)
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -A Win32 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPIXI_CI_BUILD=ON
if: matrix.os == 'windows-latest' && matrix.platform == 'x86'
- name: Configure CMake (x64|Windows)
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPIXI_CI_BUILD=ON
if: matrix.os == 'windows-latest' && matrix.platform == 'x64'
- name: Configure CMake (Macos)
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPIXI_CI_BUILD=ON
if: matrix.os == 'macos-latest'
- name: Configure CMake (Linux)
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPIXI_CI_BUILD=ON
env:
CC: gcc-11
CXX: g++-11
if: matrix.os == 'ubuntu-latest'
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config ${{env.BUILD_TYPE}}
- name: Setup msbuild
uses: microsoft/[email protected]
if: matrix.os == 'windows-latest'
- name: Setup nuget
uses: actions/setup-dotnet@v4
if: matrix.os == 'windows-latest'
- name: Build CFG Editor
shell: powershell
run: |
cd "${{github.workspace}}/src/CFG Editor"
nuget restore "CFG Editor.sln"
msbuild.exe "CFG Editor.sln" -p:Configuration=Release
Compress-Archive "${{github.workspace}}/src/CFG Editor/CFG Editor/bin/Release/CFG Editor.exe","${{github.workspace}}/src/CFG Editor/CFG Editor/bin/Release/Newtonsoft.Json.dll" ${{github.workspace}}/cfgeditor.zip
if: matrix.os == 'windows-latest'
- name: Run basic unit tests
working-directory: ${{github.workspace}}/build/unittests
run: ctest --rerun-failed --output-on-failure -C ${{env.BUILD_TYPE}}
- name: Create pixi.zip release
run: python ${{github.workspace}}/zip.py
- name: Upload
uses: actions/upload-artifact@v4
with:
name: pixi_${{matrix.os}}_${{matrix.platform}}
path: ${{github.workspace}}/pixi.zip
test:
runs-on: ${{ matrix.os }}
needs: build
if: startsWith(github.event.head_commit.message, '[NoTest]') == false && startsWith(github.event.ref, 'refs/tags') == false
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
steps:
- uses: actions/checkout@v4
- name: Download build artifact
id: download
uses: actions/download-artifact@v4
with:
name: pixi_${{matrix.os}}_x64
path: ${{github.workspace}}/build_artifact
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install python packages
run: |
python -m pip install --upgrade pip
python -m pip install beautifulsoup4 requests
- name: Setup compilers
run: |
sudo apt update
sudo apt install gcc-11 g++-11
shell: bash
if: matrix.os == 'ubuntu-latest'
- name: Get branch name
id: branch-name
uses: tj-actions/[email protected]
- name: Cache sprites
id: cache-sprites
uses: actions/cache@v4
with:
path: ${{github.workspace}}/test/.sprites_dl_cache
key: pixi-test-sprites
- name: Test (linux)
working-directory: ${{github.workspace}}/test
shell: bash
run: bash pixi_test.sh ${{steps.branch-name.outputs.current_branch}} remote
env:
CC: gcc-11
CXX: g++-11
ARTIFACT_PATH: ${{steps.download.outputs.download-path}}/pixi.zip
if: matrix.os == 'ubuntu-latest'
- name: Test (windows)
working-directory: ${{github.workspace}}/test
shell: pwsh
run: |
Set-Alias py python
./pixi_test.ps1 -Branch ${{steps.branch-name.outputs.current_branch}} -RepoType remote
env:
ARTIFACT_PATH: ${{steps.download.outputs.download-path}}/pixi.zip
if: matrix.os == 'windows-latest'
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-result-${{matrix.os}}
path: ${{github.workspace}}/test/result.json