Skip to content

Fsdk/Network: allow nuget.exe on non-legacy #1497

Fsdk/Network: allow nuget.exe on non-legacy

Fsdk/Network: allow nuget.exe on non-legacy #1497

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
publish:
needs:
- sanity-check
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 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: Compose full version on normal push
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: |
. ./version.config
# to disable welcome msg, see https://stackoverflow.com/a/70493818/544947
export DOTNET_NOLOGO=true
echo "\nFullVersion=`dotnet fsi Tools/nugetPush.fsx --output-version $BaseVersion`" >> ./version.config
- name: Get full version when it's git tag
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: echo "\nFullVersion=${GITHUB_REF#refs/*/}" >> ./version.config
- name: Pack the fsxc NuGet package
run: |
. ./version.config
dotnet pack fsxc/fsxc.fsproj -p:PackageVersion=$FullVersion
- name: Pack the Fsdk NuGet package
run: |
. ./version.config
dotnet pack Fsdk/Fsdk.fsproj -p:PackageVersion=$FullVersion
- name: Pack the fsx NuGet package
run: |
. ./version.config
dotnet pack fsx/fsx.fsproj -p:PackageVersion=$FullVersion
- name: Publish fsxc on NuGet website
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && env.NUGET_API_KEY != null
run: |
. ./version.config
dotnet nuget push fsxc/nupkg/fsxc.$FullVersion.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json
- name: Publish Fsdk on NuGet website
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && env.NUGET_API_KEY != null
run: |
. ./version.config
dotnet nuget push Fsdk/nupkg/Fsdk.$FullVersion.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json
- name: Publish fsx on NuGet website
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && env.NUGET_API_KEY != null
run: |
. ./version.config
dotnet nuget push fsx/nupkg/fsx.$FullVersion.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json
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 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/setup-dotnet@v1.7.2
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/setup-dotnet@v1.7.2
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/setup-dotnet@v1.7.2
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