fix non-portable include path #166
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**/README.md" | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**/README.md" | |
| env: | |
| USERNAME: OpticalUltrasoundImaging | |
| VCPKG_ROOT: ${{ github.workspace }}/vcpkg | |
| VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg | |
| FEED_URL: https://nuget.pkg.github.com/OpticalUltrasoundImaging/index.json | |
| VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite;nuget,https://nuget.pkg.github.com/OpticalUltrasoundImaging/index.json,readwrite" | |
| jobs: | |
| Build-Win64: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Export GitHub Actions cache environment variables | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Setup VCPKG | |
| shell: pwsh | |
| run: | | |
| cd ${{ github.workspace }} | |
| git clone https://github.com/microsoft/vcpkg | |
| ${{ github.workspace }}/vcpkg/bootstrap-vcpkg.bat | |
| - name: Add NuGet sources | |
| shell: pwsh | |
| run: | | |
| .$(${{ env.VCPKG_EXE }} fetch nuget) ` | |
| sources add ` | |
| -Source "${{ env.FEED_URL }}" ` | |
| -StorePasswordInClearText ` | |
| -Name GitHubPackages ` | |
| -UserName "${{ env.USERNAME }}" ` | |
| -Password "${{ secrets.GH_PACKAGES_TOKEN }}" | |
| .$(${{ env.VCPKG_EXE }} fetch nuget) ` | |
| setapikey "${{ secrets.GH_PACKAGES_TOKEN }}" ` | |
| -Source "${{ env.FEED_URL }}" | |
| - name: CMake configure | |
| shell: pwsh | |
| run: cmake --preset win64 | |
| - name: CMake build | |
| shell: pwsh | |
| run: cmake --build --preset win64-release | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ArpamGuiQt-win64 | |
| path: ${{ github.workspace }}/build/win64/ArpamGuiQt/Release | |
| if-no-files-found: "warn" # output a warning if no files are found. | |
| overwrite: true | |
| Build-mac: | |
| runs-on: macos-14 | |
| steps: | |
| - name: Export GitHub Actions cache environment variables | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install system-wide build tools | |
| shell: bash | |
| # Install | |
| # mono: NuGet requires a dotnet runtime | |
| # ninja: Build system | |
| # llvm: Just for clang-tidy. Need to add to path. | |
| # Just add clang-tidy to path, not all of LLVM clang. | |
| # | |
| run: | | |
| brew install mono ninja llvm | |
| ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin/clang-tidy | |
| - name: Install missing build tools required by VCPKG packages | |
| # ICU requires Homebrew autoconf, autoconf-archive, and automake | |
| # glibtoolize requires libtool | |
| run: brew install autoconf autoconf-archive automake libtool | |
| - name: Setup VCPKG | |
| shell: bash | |
| run: | | |
| cd ${{ github.workspace }} | |
| git clone https://github.com/microsoft/vcpkg | |
| ${{ github.workspace }}/vcpkg/bootstrap-vcpkg.sh | |
| - name: Add NuGet sources | |
| shell: bash | |
| run: | | |
| mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ | |
| sources add \ | |
| -Source "${{ env.FEED_URL }}" \ | |
| -StorePasswordInClearText \ | |
| -Name GitHubPackages \ | |
| -UserName "${{ env.USERNAME }}" \ | |
| -Password "${{ secrets.GH_PACKAGES_TOKEN }}" | |
| mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ | |
| setapikey "${{ secrets.GH_PACKAGES_TOKEN }}" \ | |
| -Source "${{ env.FEED_URL }}" | |
| - name: CMake configure | |
| shell: bash | |
| run: cmake --preset clang | |
| - name: CMake build | |
| shell: bash | |
| run: cmake --build --preset clang-release | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ArpamGuiQt-mac | |
| path: ${{ github.workspace }}/build/clang/ArpamGuiQt/Release/ArpamGuiQt.dmg | |
| if-no-files-found: "warn" # output a warning if no files are found. | |
| overwrite: true |