CI #2400
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| # see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
| schedule: | |
| # once a day | |
| - cron: "0 0 * * *" | |
| jobs: | |
| publish: | |
| needs: | |
| - sanity-check | |
| runs-on: ubuntu-latest | |
| container: | |
| image: "ubuntu:26.04" | |
| env: | |
| NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: install sudo | |
| run: apt update && apt install --yes sudo | |
| - name: install dependencies | |
| run: | | |
| sudo apt install --yes git | |
| sudo DEBIAN_FRONTEND=noninteractive apt install --yes dotnet10 | |
| # workaround for https://github.com/actions/runner/issues/2033 | |
| - name: ownership workaround | |
| run: git config --global --add safe.directory '*' | |
| - name: Publish nuget packages | |
| run: dotnet fsi scripts/publish.fsx | |
| sanity-check: | |
| needs: | |
| - macOS--dotnet10-and-mono | |
| - linux-oldLTS-github--dotnet-and-newmono | |
| - linux-newLTS-vanilla--dotnet10 | |
| - windows--dotnet10 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| with: | |
| submodules: recursive | |
| # needed because of commit-lint, see https://github.com/conventional-changelog/commitlint/issues/3376 | |
| fetch-depth: 0 | |
| - name: Install dependencies of commitlint | |
| run: | | |
| sudo apt update --yes | |
| sudo apt install --yes npm | |
| - name: Pull our commitlint configuration | |
| run: | | |
| git clone https://github.com/nblockchain/conventions.git | |
| rm -rf conventions/.git/ | |
| - name: Validate current commit (last commit) with commitlint | |
| if: github.event_name == 'push' | |
| run: ./conventions/commitlint.sh --last --verbose | |
| - name: Validate PR commits with commitlint | |
| if: github.event_name == 'pull_request' | |
| run: ./conventions/commitlint.sh --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose | |
| - name: Setup .NET SDK 10.0.x | |
| uses: actions/setup-dotnet@v1.7.2 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: fantomless | |
| run: | | |
| dotnet new tool-manifest | |
| dotnet tool install fantomless-tool --version 4.7.996 | |
| dotnet fantomless --recurse . | |
| git diff --exit-code | |
| macOS--dotnet10-and-mono: | |
| runs-on: macOS-14 | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: check mono version | |
| run: mono --version | |
| - name: Setup .NET SDK 10.0.x | |
| uses: actions/setup-dotnet@v1.7.2 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: configure | |
| run: ./configure.sh | |
| - name: build in DEBUG mode | |
| run: make | |
| - name: run unit tests | |
| run: dotnet fsi scripts/runUnitTests.fsx | |
| - name: install | |
| run: | | |
| # to clean Debug artifacts first (make install builds in Release config) | |
| git clean -fdx | |
| ./configure.sh | |
| make release | |
| sudo make install | |
| - name: run tests | |
| run: make check | |
| - name: compile this repo's .fsx scripts with fsx | |
| run: ./compileFSharpScripts.fsx | |
| linux-oldLTS-github--dotnet-and-newmono: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| DOTNET_ROLL_FORWARD: major | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: install last version of mono (Microsoft APT repositories) | |
| run: sudo ./scripts/CI/install_mono_from_microsoft_deb_packages.sh | |
| - name: check mono version | |
| run: mono --version | |
| - name: configure | |
| run: ./configure.sh | |
| - name: build in DEBUG mode | |
| run: make | |
| - name: run unit tests | |
| run: dotnet fsi scripts/runUnitTests.fsx | |
| - name: install | |
| run: | | |
| # to clean Debug artifacts first (make install builds in Release config) | |
| git clean -fdx | |
| ./configure.sh | |
| make release | |
| sudo make install | |
| - name: run tests | |
| run: make check | |
| - name: compile this repo's .fsx scripts with fsx | |
| run: ./compileFSharpScripts.fsx | |
| linux-newLTS-vanilla--dotnet10: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: "ubuntu:26.04" | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: install sudo | |
| run: apt update && apt install --yes sudo | |
| - name: install dependencies | |
| run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet10 | |
| # workaround for https://github.com/actions/runner/issues/2033 | |
| - name: ownership workaround | |
| run: git config --global --add safe.directory '*' | |
| - name: check dotnet version | |
| run: dotnet --version | |
| - name: configure | |
| run: ./configure.sh | |
| - name: build in DEBUG mode | |
| run: make | |
| - name: run unit tests | |
| run: dotnet fsi scripts/runUnitTests.fsx | |
| - name: install | |
| run: | | |
| # to clean Debug artifacts first (make install builds in Release config) | |
| git clean -fdx | |
| ./configure.sh | |
| make release | |
| sudo make install | |
| - name: run tests | |
| run: make check | |
| - name: compile this repo's .fsx scripts with fsx | |
| run: ./compileFSharpScripts.fsx | |
| windows--dotnet10: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Setup .NET SDK 10.0.x | |
| uses: actions/setup-dotnet@v1.7.2 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: build in DEBUG mode | |
| run: .\make.bat | |
| - name: run unit tests | |
| run: dotnet fsi scripts/runUnitTests.fsx | |
| - name: install | |
| run: | | |
| # to clean Debug artifacts first (make install builds in Release config) | |
| git clean -fdx | |
| .\make.bat release | |
| .\make.bat install | |
| - name: run tests | |
| run: .\make.bat check | |
| - name: compile this repo's .fsx scripts with fsx | |
| run: dotnet fsi compileFSharpScripts.fsx | |