fix build issues maybe #141
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: vcpkg | |
on: [push, pull_request] | |
jobs: | |
build-ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout all the submodules | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install necessary packages | |
run: sudo apt update && sudo apt-get install --fix-missing && sudo apt install -y ninja-build curl libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev pkg-config autoconf libudev-dev dh-autoreconf freeglut3-dev gdb make | |
- uses: actions/checkout@v2.3.4 | |
- name: Setup anew (or from cache) vcpkg (and does not build any package) | |
uses: lukka/run-vcpkg@v11 | |
- name: Run CMake | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: 'Linux-release' | |
buildPreset: 'Linux-release' | |
- name: Zip up | |
if: startsWith(github.ref, 'refs/tags/') | |
run: zip -j ${{ github.workspace }}/InfraredBrickTower-${{ github.ref_name }}-Linux-x64.zip ${{ github.workspace }}/out/build/Linux-release/InfraredBrickTower | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ${{ github.workspace }}/InfraredBrickTower-${{ github.ref_name }}-Linux-x64.zip | |
build-windows: | |
env: | |
WINDOWS_ZIP_PATH: ${{ github.workspace }}\InfraredBrickTower-${{ github.ref_name }}-Windows-x64.zip | |
runs-on: windows-latest | |
steps: | |
- name: checkout all the submodules | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/checkout@v2.3.4 | |
- name: Setup anew (or from cache) vcpkg (and does not build any package) | |
uses: lukka/run-vcpkg@v11 | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v1.1 | |
with: | |
vs-version: '17.8.3' | |
- name: Build driver | |
run: msbuild ${{ github.workspace }}/InfraredBrickTower.sln -property:Configuration=Release -property:Platform=x64 | |
- name: Run CMake | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: 'Windows-release' | |
buildPreset: 'Windows-release' | |
- name: Zip up | |
if: startsWith(github.ref, 'refs/tags/') | |
run: Compress-Archive -Path "${{ github.workspace }}\x64\Release\IBTDriverWin.lib", "${{ github.workspace }}\x64\Release\IBTDriver.inf", "${{ github.workspace }}\x64\Release\IBTDriverPackage\ibtdriver.cat", "${{ github.workspace }}\x64\Release\IBTDriverPackage.cer", "${{ github.workspace }}\out\build\Windows-release\Release\InfraredBrickTower.exe" -DestinationPath "$env:WINDOWS_ZIP_PATH" | |
- name: Fix path | |
id: fix-path | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
$fixed_path = "$env:WINDOWS_ZIP_PATH" -replace '\\','/' | |
"FIXED_PATH=$fixed_path" | Out-File -FilePath $env:GITHUB_OUTPUT -Append | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
FIXED_PATH: ${{ steps.fix-path.outputs.FIXED_PATH }} | |
with: | |
files: ${{ env.FIXED_PATH }} | |