Merge pull request #249 from vein-lang/fixes/generic-adaptation #382
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: Build | |
on: | |
push: | |
paths-ignore: | |
- 'samples/**' | |
- '**.js' | |
- '**.md' | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build_all: | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
target: osx-x64 | |
install_deps: false | |
- os: ubuntu-latest | |
target: linux-x64 | |
install_deps: true | |
- os: windows-latest | |
target: win-x64 | |
install_deps: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- run: git fetch --prune --unshallow --tags | |
- uses: actions/cache@v1 | |
id: cache | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-build-aot | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.100 | |
- name: install pre-req | |
if: ${{ matrix.install_deps }} | |
run: sudo apt-get install clang zlib1g-dev libkrb5-dev libssl-dev libgc-dev | |
- name: Install GitVersion | |
run: dotnet tool install --global --version 5.6.7 GitVersion.Tool | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: AOT build (VM) | |
run: dotnet publish -r ${{ matrix.target }} -c Release --self-contained --output ./../../out | |
working-directory: ./runtime/ishtar.vm | |
- name: Build (Compiler) | |
run: dotnet publish -r ${{ matrix.target }} -c Release --self-contained --output ./../out | |
working-directory: ./compiler/ | |
- name: Build (Installer) | |
run: dotnet publish -r ${{ matrix.target }} -c Release --self-contained --output ./../out | |
working-directory: ./installer/ | |
- name: Upload artifacts | |
uses: actions/[email protected] | |
with: | |
name: ${{ matrix.target }}-build | |
path: ./out | |
if-no-files-found: error | |
build_linux_arm64: | |
runs-on: ubuntu-20.04 | |
needs: [coverage] | |
container: { image: 'ghcr.io/vein-lang/ubuntu18.04-with-crossroot-arm64:latest' } | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- run: git fetch --prune --unshallow --tags | |
- uses: actions/cache@v1 | |
id: cache | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-linux-arm64 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.100 | |
- name: Install GitVersion | |
run: dotnet tool install --global --version 5.6.7 GitVersion.Tool | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: AOT build | |
run: dotnet publish -r linux-arm64 -c Release -p:CppCompilerAndLinker=clang-9 -p:SysRoot=/.tools/rootfs/arm64 | |
working-directory: ./runtime/ishtar.vm | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: linux-arm64-build | |
path: ./runtime/ishtar.vm/bin/Release/net6.0/linux-arm64/native | |
if-no-files-found: error | |
build_win_arm64: | |
runs-on: windows-latest | |
needs: [coverage] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- run: git fetch --prune --unshallow --tags | |
- uses: actions/cache@v1 | |
id: cache | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-win-arm64 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.100 | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: AOT build | |
run: dotnet publish -r win-arm64 -c Release | |
working-directory: ./runtime/ishtar.vm | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: win-arm64-build | |
path: ./runtime/ishtar.vm/bin/Release/net6.0/win-arm64/native | |
if-no-files-found: error | |
coverage: | |
runs-on: windows-latest | |
needs: [build_all] | |
env: | |
COMPlus_StressLog: 1 | |
COMPlus_LogLevel: 6 | |
COMPlus_LogFacility: 0x00080001 | |
COMPlus_StressLogSize: 2000000 | |
COMPlus_TotalStressLogSize: 40000000 | |
steps: | |
- name: Export Env | |
run: $env:CODACY_PROJECT_TOKEN="${{ secrets.CODACY_API_KEY }}" | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- run: git fetch --prune --unshallow --tags | |
- uses: actions/cache@v1 | |
id: cache | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-common | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.100 | |
- name: Install DotCover | |
run: dotnet tool install --global JetBrains.dotCover.GlobalTool --version 2021.2.0-eap03 | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test | |
run: dotnet dotcover test --no-build --dcReportType=DetailedXml | |
- name: Codacy Coverage Reporter | |
uses: codacy/[email protected] | |
with: | |
project-token: ${{ secrets.CODACY_API_KEY }} | |
coverage-reports: dotCover.Output.xml | |
- name: Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: dotCover.Output.xml |