Merge branch integrate-new-solver into develop #517
This file contains hidden or 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: Build+Test | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| jobs: | |
| build-windows: | |
| runs-on: windows-2022 | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| shell: cmd | |
| env: | |
| RUSTFLAGS: -D warnings # Make Rust compiler fail on warnings | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: virtualbow | |
| - uses: TheMrMilchmann/setup-msvc-dev@v3 # Setup MSVC build environment | |
| with: | |
| arch: x64 | |
| - name: Get dependencies | |
| run: | | |
| choco install ninja | |
| curl -LO https://github.com/bow-simulation/virtualbow-dependencies/releases/download/v1.7.0/windows-msvc_64.zip && 7z x windows-msvc_64.zip | |
| - name: Extract test files | |
| run: | | |
| cd virtualbow/rust/virtualbow/data | |
| 7z x examples.zip -p${{ secrets.UNZIP_PASSWORD }} | |
| - name: Build and test solver | |
| run: | | |
| cd virtualbow/rust | |
| cargo clippy --all-targets | |
| cargo build --release | |
| cargo test --release | |
| - name: Build and test application | |
| run: | | |
| mkdir build && cd build | |
| cmake ../virtualbow/gui -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../windows-msvc_64/paths.cmake | |
| cmake --build . -j4 | |
| cmake --build . --target iss-installer -j4 | |
| virtualbow-test.exe | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-application | |
| path: build/application | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-packages | |
| path: build/packages | |
| if-no-files-found: error | |
| build-linux: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| env: | |
| RUSTFLAGS: -D warnings # Make Rust compiler fail on warnings | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: virtualbow | |
| - name: Get dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y ninja-build qt6-base-dev pkg-config libfreetype6-dev libfontconfig1-dev | |
| curl -LO https://github.com/bow-simulation/virtualbow-dependencies/releases/download/v1.7.0/linux-gcc_64.zip && unzip linux-gcc_64.zip | |
| - name: Extract test files | |
| run: | | |
| cd virtualbow/rust/virtualbow/data | |
| 7z x examples.zip -p${{ secrets.UNZIP_PASSWORD }} | |
| - name: Build and test solver | |
| run: | | |
| cd virtualbow/rust | |
| cargo clippy --all-targets | |
| cargo build --release | |
| cargo test --release | |
| - name: Build and test application | |
| run: | | |
| mkdir build && cd build | |
| cmake ../virtualbow/gui -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../linux-gcc_64/paths.cmake | |
| cmake --build . -j4 | |
| cmake --build . --target deb-package -j4 | |
| cmake --build . --target rpm-package -j4 | |
| ./virtualbow-test | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-application | |
| path: build/application | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-packages | |
| path: build/packages | |
| if-no-files-found: error | |
| build-macos: | |
| runs-on: macos-14 | |
| timeout-minutes: 30 | |
| env: | |
| RUSTFLAGS: -D warnings # Make Rust compiler fail on warnings | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: virtualbow | |
| - name: Get dependencies | |
| run: | | |
| npm install -g appdmg@0.6.6 --no-audit | |
| curl -LO https://github.com/bow-simulation/virtualbow-dependencies/releases/download/v1.7.0/macos-clang_64.zip && unzip macos-clang_64.zip | |
| chmod -R 755 macos-clang_64 | |
| - name: Extract test files | |
| run: | | |
| cd virtualbow/rust/virtualbow/data | |
| 7z x examples.zip -p${{ secrets.UNZIP_PASSWORD }} | |
| - name: Build and test solver | |
| run: | | |
| cd virtualbow/rust | |
| cargo clippy --all-targets | |
| cargo build --release | |
| cargo test --release | |
| - name: Build and test application | |
| run: | | |
| mkdir build && cd build | |
| cmake ../virtualbow/gui -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../macos-clang_64/paths.cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 | |
| cmake --build . -j4 | |
| cmake --build . --target dmg-installer -j4 | |
| ./virtualbow-test | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-application | |
| path: build/application | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-packages | |
| path: build/packages | |
| if-no-files-found: error | |
| develop-release: | |
| if: github.ref == 'refs/heads/develop' | |
| runs-on: ubuntu-latest | |
| needs: [build-windows, build-linux, build-macos] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-packages | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-packages | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: macos-packages | |
| - name: Rename packages | |
| run: | | |
| mv virtualbow-setup.exe virtualbow-${GITHUB_SHA::7}-win64.exe | |
| mv virtualbow.deb virtualbow-${GITHUB_SHA::7}-linux64.deb | |
| mv virtualbow.rpm virtualbow-${GITHUB_SHA::7}-linux64.rpm | |
| mv virtualbow.dmg virtualbow-${GITHUB_SHA::7}-mac64.dmg | |
| - name: Delete latest tag | |
| run: gh release delete latest --cleanup-tag --repo "$GITHUB_REPOSITORY" | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Development Build | |
| tag_name: latest | |
| prerelease: true | |
| files: virtualbow* | |
| tagged-release: | |
| if: startsWith(github.ref, 'refs/tags') | |
| runs-on: ubuntu-latest | |
| needs: [build-windows, build-linux, build-macos] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-packages | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-packages | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: macos-packages | |
| - name: Rename packages | |
| run: | | |
| mv virtualbow-setup.exe virtualbow-${{github.ref_name}}-win64.exe | |
| mv virtualbow.deb virtualbow-${{github.ref_name}}-linux64.deb | |
| mv virtualbow.rpm virtualbow-${{github.ref_name}}-linux64.rpm | |
| mv virtualbow.dmg virtualbow-${{github.ref_name}}-mac64.dmg | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| files: virtualbow* |