Skip to content

Commit

Permalink
feat: refactored cli
Browse files Browse the repository at this point in the history
improves the commandline interface for bebopc and streamlines much of internal code
  • Loading branch information
andrewmd5 committed Dec 16, 2023
1 parent 633bc7f commit f639ab6
Show file tree
Hide file tree
Showing 76 changed files with 2,335 additions and 2,122 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-bebopc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:
BUILD_ZIP_ARTIFACT_ARM64: ./bin/compiler/Release/publish/${{matrix.ARTIFACT}}-${{matrix.IDENTIFIER}}-arm64.zip

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Get Enviorment Variables
id: dotenv
uses: falti/dotenv-action@v0.2.5
uses: falti/dotenv-action@v1.0.4

- if: matrix.os == 'ubuntu-22.04'
name: Install Dependencies
Expand All @@ -53,10 +53,10 @@ jobs:
sudo apt-get install clang zlib1g-dev libkrb5-dev libtinfo5
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel
include-prerelease: true
dotnet-version: "8.0.x"
dotnet-quality: 'preview'
- name: Restore Solution
run: dotnet restore

Expand Down Expand Up @@ -86,13 +86,13 @@ jobs:
Compress-Archive -Path ${{env.BUILD_ARTIFACT_ARM64}} -DestinationPath ${{env.BUILD_ZIP_ARTIFACT_ARM64}}
- name: Upload X86_64 Build
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{matrix.IDENTIFIER}}-x64
path: ${{env.BUILD_ZIP_ARTIFACT_X86_64}}

- name: Upload ARM64 Build
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{matrix.IDENTIFIER}}-arm64
path: ${{env.BUILD_ZIP_ARTIFACT_ARM64}}
12 changes: 6 additions & 6 deletions .github/workflows/build-repl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
REPL_ROOT: ${{github.workspace}}/Repl
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Get Enviorment Variables
id: dotenv
uses: falti/dotenv-action@v0.2.5
uses: falti/dotenv-action@v1.0.4

- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel
include-prerelease: true
dotnet-version: "8.0.x"
dotnet-quality: 'preview'
- name: Restore Project
run: dotnet restore
working-directory: ${{env.REPL_ROOT}}
Expand All @@ -32,7 +32,7 @@ jobs:
working-directory: ${{env.REPL_ROOT}}

- name: Upload Package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bebop-repl-latest
path: ${{github.workspace}}/bin/repl/Release/publish/wwwroot/
10 changes: 5 additions & 5 deletions .github/workflows/build-runtime-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ jobs:
RUNTIME_ROOT: ${{github.workspace}}/Runtime/C#
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Get Enviorment Variables
id: dotenv
uses: falti/dotenv-action@v0.2.5
uses: falti/dotenv-action@v1.0.4

- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
include-prerelease: true
dotnet-quality: 'preview'
- name: Generate Output.g.cs
working-directory: "./Laboratory/C#"
run: dotnet run --project ../../Compiler/ --cs "./GeneratedTestCode/Output.g.cs" --namespace Bebop.Codegen --files $(ls -p ../Schemas/Valid/*.bop | tr '\n' ' ')
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
working-directory: ${{env.RUNTIME_ROOT}}

- name: Upload Package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bebop-runtime-cs-latest
path: ${{env.RUNTIME_ROOT}}/bin/Release/*.nupkg
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
include-prerelease: true
dotnet-quality: 'preview'
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
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
- uses: actions/checkout@v4

- name: Get Environment Variables
id: dotenv
uses: falti/dotenv-action@v0.2.5
uses: falti/dotenv-action@v1.0.4

# ubuntu is the fastest OS to spin up and if one fails they all fail.
- if: matrix.os == 'ubuntu-22.04'
Expand All @@ -52,10 +52,10 @@ jobs:
sudo apt-get install clang zlib1g-dev libkrb5-dev libtinfo5
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel
include-prerelease: true
dotnet-version: "8.0.x"
dotnet-quality: 'preview'

- name: Build bebopc
run: |
Expand Down Expand Up @@ -109,13 +109,13 @@ jobs:
Compress-Archive -Path ${{env.BUILD_ARTIFACT_ARM64}} -DestinationPath ${{env.BUILD_ZIP_ARTIFACT_ARM64}}
- name: Upload X86_64 Build
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{matrix.IDENTIFIER}}-x64
path: ${{env.BUILD_ZIP_ARTIFACT_X86_64}}

- name: Upload ARM64 Build
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{matrix.IDENTIFIER}}-arm64
path: ${{env.BUILD_ZIP_ARTIFACT_ARM64}}
Expand All @@ -131,7 +131,7 @@ jobs:
runs-on: ubuntu-22.04
needs: build-compiler
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v1
with:
node-version: "18.16.0" # LTS
Expand All @@ -141,10 +141,10 @@ jobs:
uses: falti/[email protected]

- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel
include-prerelease: true
dotnet-version: "8.0.x"
dotnet-quality: 'preview'

- name: Test .NET Runtime
run: |
Expand All @@ -159,7 +159,7 @@ jobs:
working-directory: ${{env.NET_RUNTIME_ROOT}}

- name: Upload .NET Runtime Package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bebop-runtime-cs-${{ steps.dotenv.outputs.version }}
path: ${{env.NET_RUNTIME_ROOT}}/bin/Release/bebop.${{ steps.dotenv.outputs.version }}.nupkg
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
mv tmp Cargo.toml
cargo package --allow-dirty
- name: Upload Rust Runtime
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bebop-runtime-rust-${{steps.dotenv.outputs.version}}
path: ${{ env.RUST_RUNTIME_ROOT }}/target/package/bebop-${{ steps.dotenv.outputs.version }}.crate
Expand All @@ -225,7 +225,7 @@ jobs:
working-directory: ${{env.TS_RUNTIME_ROOT}}

- name: Upload TypeScript Runtime Package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bebop-runtime-ts-${{ steps.dotenv.outputs.version }}
path: ${{env.TS_RUNTIME_ROOT}}/bebop-v${{ steps.dotenv.outputs.version }}.tgz
Expand All @@ -237,7 +237,7 @@ jobs:
working-directory: ./Repl/

- name: Upload REPL Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bebop-repl-${{ steps.dotenv.outputs.version }}
path: ./bin/repl/Release/publish/wwwroot/
Expand All @@ -249,7 +249,7 @@ jobs:
needs: build-compiler
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -281,7 +281,7 @@ jobs:
working-directory: ${{env.TOOLS_ROOT}}/vs

- name: Upload Nuget Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bebop-tools-nuget-${{ steps.dotenv.outputs.version }}
path: ${{env.TOOLS_ROOT}}/vs/packages/bebop-tools.${{ steps.dotenv.outputs.version }}.nupkg
Expand All @@ -294,7 +294,7 @@ jobs:
cargo package --allow-dirty
- name: Upload Cargo Tools
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bebop-tools-cargo-${{ steps.dotenv.outputs.version }}
path: ${{ env.TOOLS_ROOT }}/cargo/target/package/bebop-tools-${{ steps.dotenv.outputs.version }}.crate
Expand All @@ -311,7 +311,7 @@ jobs:
working-directory: ${{env.TOOLS_ROOT}}/node

- name: Upload NPM Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bebop-tools-npm-${{ steps.dotenv.outputs.version }}
path: ${{env.TOOLS_ROOT}}/node/bebop-tools-v${{ steps.dotenv.outputs.version }}.tgz
Expand All @@ -329,7 +329,7 @@ jobs:
working-directory: ./vscode-bebop

- name: Upload VSCode artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: vscode-bebop
path: vscode-bebop/bebop-lang-*.vsix
Expand All @@ -341,7 +341,7 @@ jobs:
runs-on: ubuntu-22.04
needs: [build-compiler, build-runtimes, build-tools]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v1
with:
node-version: "18.16.0" # LTS
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/checkout@v1
- name: Get Environment Variables
id: dotenv
uses: falti/[email protected]

- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel
include-prerelease: true
dotnet-version: "8.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel
dotnet-quality: 'preview'

- name: Build REPL
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ jobs:
test-csharp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
include-prerelease: true
dotnet-quality: 'preview'
- name: Build and run tests
shell: bash
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
test-dart:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- uses: actions/setup-dotnet@v1
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel
include-prerelease: true
dotnet-quality: 'preview'
- name: Build and run tests
run: |
mkdir gen
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
run: cargo test
working-directory: ./Runtime/Rust
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel
include-prerelease: true
dotnet-version: "8.0.x"
dotnet-quality: 'preview'
- name: Build Compiler
run: |
dotnet build Compiler
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
test-typescript:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
with:
node-version: "18.16.0" # LTS
- uses: actions/setup-dotnet@v1
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel
include-prerelease: true
dotnet-version: "8.0.x"
dotnet-quality: 'preview'
- name: Build Typescript runtime
run: |
yarn install
Expand Down
Loading

0 comments on commit f639ab6

Please sign in to comment.