Install mono on ubuntu in order to run nuget #118
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: CMake | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest ] | |
| # Disabled until <curses.h> can be safely included without conflict in terminal.h | |
| # os: [ ubuntu-latest, windows-latest, macos-latest ] | |
| runs-on: ${{matrix.os}} | |
| env: | |
| VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| submodules: true | |
| - name: Bootstrap vcpkg Linux | |
| if: ${{matrix.os == 'ubuntu-latest'}} | |
| shell: bash | |
| run: | | |
| ${{github.workspace}}/vcpkg/bootstrap-vcpkg.sh | |
| sudo apt install mono-complete | |
| - name: Bootstrap vcpkg Windows | |
| if: ${{matrix.os == 'windows-latest'}} | |
| run: ${{github.workspace}}/vcpkg/bootstrap-vcpkg.bat | |
| - name: Add NuGet sources | |
| env: | |
| VCPKG_EXE: ${{github.workspace}}/vcpkg/vcpkg | |
| USERNAME: ${{github.repository_owner}} | |
| FEED_URL: https://nuget.pkg.github.com/${{github.repository_owner}}/index.json | |
| VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/${{github.repository_owner}}/index.json,readwrite" | |
| 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 version | |
| run: cmake --version | |
| - name: CMake Linux workflow | |
| if: ${{matrix.os == 'ubuntu-latest'}} | |
| env: | |
| VCPKG_EXE: ${{github.workspace}}/vcpkg/vcpkg | |
| USERNAME: ${{github.repository_owner}} | |
| FEED_URL: https://nuget.pkg.github.com/${{github.repository_owner}}/index.json | |
| VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/${{github.repository_owner}}/index.json,readwrite" | |
| run: cmake --workflow --preset ci-linux | |
| - name: CMake workflow | |
| if: ${{matrix.os != 'ubuntu-latest'}} | |
| env: | |
| VCPKG_EXE: ${{github.workspace}}/vcpkg/vcpkg | |
| USERNAME: ${{github.repository_owner}} | |
| FEED_URL: https://nuget.pkg.github.com/${{github.repository_owner}}/index.json | |
| VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/${{github.repository_owner}}/index.json,readwrite" | |
| run: cmake --workflow --preset default |