Skip to content

feature(): json-over-bebop #542

feature(): json-over-bebop

feature(): json-over-bebop #542

Workflow file for this run

name: build-bebopc
on:
workflow_dispatch:
push:
paths:
- "Compiler/**"
- "Core/**"
branches:
- master
pull_request:
paths:
- "Compiler/**"
- "Core/**"
branches:
- master
jobs:
build-compiler:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-22.04]
include:
- os: macos-latest
IDENTIFIER: osx
ARTIFACT: bebopc
- os: windows-latest
IDENTIFIER: win
ARTIFACT: bebopc.exe
- os: ubuntu-22.04
IDENTIFIER: linux
ARTIFACT: bebopc
env:
CONFIGURATION: Release
BUILD_ARTIFACT_X86_64: ./bin/compiler/Release/publish/${{matrix.IDENTIFIER}}-x64/${{matrix.ARTIFACT}}
BUILD_ARTIFACT_ARM64: ./bin/compiler/Release/publish/${{matrix.IDENTIFIER}}-arm64/${{matrix.ARTIFACT}}
BUILD_ZIP_ARTIFACT_X86_64: ./bin/compiler/Release/publish/${{matrix.ARTIFACT}}-${{matrix.IDENTIFIER}}-x64.zip
BUILD_ZIP_ARTIFACT_ARM64: ./bin/compiler/Release/publish/${{matrix.ARTIFACT}}-${{matrix.IDENTIFIER}}-arm64.zip
steps:
- uses: actions/checkout@v1
- name: Get Enviorment Variables
id: dotenv
uses: falti/[email protected]
- if: matrix.os == 'ubuntu-22.04'
name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install clang zlib1g-dev libkrb5-dev libtinfo5
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel
include-prerelease: true
- name: Restore Solution
run: dotnet restore
- name: Build bebopc
run: |
dotnet publish -c ${{env.CONFIGURATION}} -r ${{matrix.IDENTIFIER}}-x64 -p:ReleaseVersion=${{ steps.dotenv.outputs.version }} -p:PublishTrimmed=false -p:PublishSingleFile=true --self-contained
dotnet publish -c ${{env.CONFIGURATION}} -r ${{matrix.IDENTIFIER}}-arm64 -p:ReleaseVersion=${{ steps.dotenv.outputs.version }} -p:PublishTrimmed=false -p:PublishSingleFile=true --self-contained
working-directory: ./Compiler/
- if: matrix.os == 'macos-latest'
name: Zip macOS Binary
run: |
zip -j ${{env.BUILD_ZIP_ARTIFACT_X86_64}} ${{env.BUILD_ARTIFACT_X86_64}}
zip -j ${{env.BUILD_ZIP_ARTIFACT_ARM64}} ${{env.BUILD_ARTIFACT_ARM64}}
- if: matrix.os == 'ubuntu-22.04'
name: ZIP Linux Build
run: |
zip -j ${{env.BUILD_ZIP_ARTIFACT_X86_64}} ${{env.BUILD_ARTIFACT_X86_64}}
zip -j ${{env.BUILD_ZIP_ARTIFACT_ARM64}} ${{env.BUILD_ARTIFACT_ARM64}}
- if: matrix.os == 'windows-latest'
name: ZIP Windows Build
shell: powershell
run: |
Compress-Archive -Path ${{env.BUILD_ARTIFACT_X86_64}} -DestinationPath ${{env.BUILD_ZIP_ARTIFACT_X86_64}}
Compress-Archive -Path ${{env.BUILD_ARTIFACT_ARM64}} -DestinationPath ${{env.BUILD_ZIP_ARTIFACT_ARM64}}
- name: Upload X86_64 Build
uses: actions/upload-artifact@v2
with:
name: ${{matrix.IDENTIFIER}}-x64
path: ${{env.BUILD_ZIP_ARTIFACT_X86_64}}
- name: Upload ARM64 Build
uses: actions/upload-artifact@v2
with:
name: ${{matrix.IDENTIFIER}}-arm64
path: ${{env.BUILD_ZIP_ARTIFACT_ARM64}}