CI #1666
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: 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-22.04 | |
container: | |
image: "ubuntu:22.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 dotnet6 | |
# 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--dotnet6-and-mono | |
- macOS--mono | |
- linux-oldLTS-github--dotnet-and-xbuild | |
- linux-oldLTS-github--dotnet-and-msbuild | |
- linux-oldLTS-vanilla--stockmono | |
- linux-oldLTS-vanilla--newmono | |
- linux-newLTS-github--dotnet-and-xbuild | |
- linux-newLTS-github--dotnet-and-msbuild | |
- linux-newLTS-vanilla--stockmono | |
- linux-newLTS-vanilla--newmono | |
- linux-newLTS-vanilla--dotnet6 | |
- windows--legacyFramework | |
- windows--dotnet6 | |
runs-on: ubuntu-22.04 | |
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 --from HEAD~1 --to HEAD --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 6.0.x | |
uses: actions/[email protected] | |
with: | |
dotnet-version: '6.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--dotnet6-and-mono: | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup .NET SDK 6.0.x | |
uses: actions/[email protected] | |
with: | |
dotnet-version: '6.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 | |
macOS--mono: | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: HACK to emulate dotnet uninstall | |
run: sudo rm -f `which dotnet` | |
- name: configure | |
run: ./configure.sh | |
- name: build in DEBUG mode | |
run: make | |
- name: run unit tests | |
run: fsharpi --define:LEGACY_FRAMEWORK 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-xbuild: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: check mono version | |
run: mono --version | |
- name: install dependencies | |
run: sudo apt install --yes fsharp | |
- name: check mono version | |
run: mono --version | |
- name: configure | |
run: ./configure.sh && cat build.config | |
- 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-msbuild: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: check mono version | |
run: mono --version | |
- 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-oldLTS-vanilla--stockmono: | |
runs-on: ubuntu-20.04 | |
container: | |
image: "ubuntu:20.04" | |
steps: | |
- uses: actions/checkout@v1 | |
- name: install sudo | |
run: apt update && apt install --yes sudo | |
- name: install all dependencies | |
run: sudo apt install --yes git make curl fsharp nunit-console | |
# workaround for https://github.com/actions/runner/issues/2033 | |
- name: ownership workaround | |
run: git config --global --add safe.directory '*' | |
- name: check mono version | |
run: mono --version | |
- name: install dependencies | |
run: sudo apt install --yes fsharp | |
- name: check mono version | |
run: mono --version | |
- name: configure | |
run: ./configure.sh | |
- name: build in DEBUG mode | |
run: make | |
- 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 unit tests | |
run: ./scripts/runUnitTests.fsx | |
- name: run tests | |
run: make check | |
- name: compile this repo's .fsx scripts with fsx | |
run: ./compileFSharpScripts.fsx | |
linux-oldLTS-vanilla--newmono: | |
runs-on: ubuntu-20.04 | |
container: | |
image: "ubuntu:20.04" | |
steps: | |
- uses: actions/checkout@v1 | |
- name: install sudo | |
run: apt update && apt install --yes sudo | |
- name: install last version of mono (Microsoft APT repositories) | |
run: sudo ./scripts/CI/install_mono_from_microsoft_deb_packages.sh | |
- name: install rest of dependencies | |
run: sudo apt install --yes git make curl fsharp nunit-console | |
# workaround for https://github.com/actions/runner/issues/2033 | |
- name: ownership workaround | |
run: git config --global --add safe.directory '*' | |
- name: check mono version | |
run: mono --version | |
- name: install dependencies | |
run: sudo apt install --yes fsharp | |
- name: check mono version | |
run: mono --version | |
- name: configure | |
run: ./configure.sh | |
- name: build in DEBUG mode | |
run: make | |
- name: run unit tests | |
run: fsharpi --define:LEGACY_FRAMEWORK 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-github--dotnet-and-xbuild: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: check mono version | |
run: mono --version | |
- name: install dependencies | |
run: sudo apt install --yes fsharp | |
- 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-github--dotnet-and-msbuild: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: check mono version | |
run: mono --version | |
- 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--stockmono: | |
runs-on: ubuntu-22.04 | |
container: | |
image: "ubuntu:22.04" | |
steps: | |
- uses: actions/checkout@v1 | |
- name: install sudo | |
run: apt update && apt install --yes sudo | |
- name: install all dependencies | |
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make curl fsharp nunit-console | |
# workaround for https://github.com/actions/runner/issues/2033 | |
- name: ownership workaround | |
run: git config --global --add safe.directory '*' | |
- name: check mono version | |
run: mono --version | |
- name: install dependencies | |
run: sudo apt install --yes fsharp | |
- name: check mono version | |
run: mono --version | |
- name: configure | |
run: ./configure.sh | |
- name: build in DEBUG mode | |
run: make | |
- 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 unit tests | |
run: ./scripts/runUnitTests.fsx | |
- name: run tests | |
run: make check | |
- name: compile this repo's .fsx scripts with fsx | |
run: ./compileFSharpScripts.fsx | |
linux-newLTS-vanilla--newmono: | |
runs-on: ubuntu-22.04 | |
container: | |
image: "ubuntu:22.04" | |
steps: | |
- uses: actions/checkout@v1 | |
- name: install sudo | |
run: apt update && apt install --yes sudo | |
- name: install last version of mono (Microsoft APT repositories) | |
run: sudo ./scripts/CI/install_mono_from_microsoft_deb_packages.sh | |
- name: install rest of dependencies | |
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make curl fsharp nunit-console | |
# workaround for https://github.com/actions/runner/issues/2033 | |
- name: ownership workaround | |
run: git config --global --add safe.directory '*' | |
- name: check mono version | |
run: mono --version | |
- name: install dependencies | |
run: sudo apt install --yes fsharp | |
- name: check mono version | |
run: mono --version | |
- name: configure | |
run: ./configure.sh | |
- name: build in DEBUG mode | |
run: make | |
- name: run unit tests | |
run: fsharpi --define:LEGACY_FRAMEWORK 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--dotnet6: | |
runs-on: ubuntu-22.04 | |
container: | |
image: "ubuntu:22.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 dotnet6 | |
# 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--legacyFramework: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: HACK to emulate dotnet uninstall | |
run: del $(where.exe dotnet) | |
- name: build in DEBUG mode | |
run: .\make.bat | |
- name: run unit tests | |
run: .\Tools\fsi.bat 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: .\Tools\fsi.bat compileFSharpScripts.fsx | |
windows--dotnet6: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup .NET SDK 6.0.x | |
uses: actions/[email protected] | |
with: | |
dotnet-version: '6.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 | |