Create ClusterSpeed.asm #458
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: 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 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- 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: Set environment variables (x86|Windows) | |
shell: bash | |
run: | | |
echo "WIN_PLAT_TYPE=Win32" >> $GITHUB_ENV | |
if: matrix.platform == 'x86' && matrix.os == 'windows-latest' | |
- name: Set environment variables (x64|Windows) | |
shell: bash | |
run: | | |
echo "WIN_PLAT_TYPE=x64" >> $GITHUB_ENV | |
if: matrix.platform == 'x64' && matrix.os == 'windows-latest' | |
- name: Get branch name | |
id: branch-name | |
uses: tj-actions/[email protected] | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- 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 | |
shell: bash | |
working-directory: ${{github.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE -A ${{ env.WIN_PLAT_TYPE }} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPIXI_CI_BUILD=ON | |
if: matrix.os == 'windows-latest' | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{github.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPIXI_CI_BUILD=ON | |
if: matrix.os == 'macos-latest' | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{github.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$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 $BUILD_TYPE | |
- name: Setup msbuild | |
uses: microsoft/[email protected] | |
if: matrix.os == 'windows-latest' | |
- name: Setup nuget | |
uses: actions/setup-dotnet@v3 | |
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 $BUILD_TYPE | |
- name: Create pixi.zip release | |
run: python ${{github.workspace}}/zip.py | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
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]')" | |
strategy: | |
matrix: | |
os: [ windows-latest, ubuntu-latest ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download build artifact | |
id: download | |
uses: actions/download-artifact@v3 | |
with: | |
name: pixi_${{matrix.os}}_x64 | |
path: ${{github.workspace}}/build_artifact | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
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: 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 ${{steps.branch-name.outputs.current_branch}} remote | |
env: | |
ARTIFACT_PATH: ${{steps.download.outputs.download-path}}/pixi.zip | |
if: matrix.os == 'windows-latest' | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-result-${{matrix.os}} | |
path: ${{github.workspace}}/test/result.json | |