Skip to content

Commit

Permalink
Merge CSProj and root namespace name with name in distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
Viir committed Apr 16, 2024
1 parent e8dba50 commit acb8a84
Show file tree
Hide file tree
Showing 150 changed files with 28 additions and 29 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-publish-elm-silent-teacher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
paths:
- "implement/elm-time/ElmTime/**"
- "implement/pine/ElmTime/**"
- ".github/workflows/build-and-publish-elm-silent-teacher.yml"

jobs:
Expand All @@ -25,13 +25,13 @@ jobs:
sudo ./elm-time/elm-time install
- name: Build for Netlify
working-directory: ./implement/elm-time/ElmTime/learn-elm
working-directory: ./implement/pine/ElmTime/learn-elm
run: |
elm-time make src/Frontend/ElmSilentTeacher/Build.elm --output=netlify.zip
pwsh -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('netlify.zip','./out/netlify');}"
- name: Deploy to Netlify
working-directory: ./implement/elm-time/ElmTime/learn-elm
working-directory: ./implement/pine/ElmTime/learn-elm
run: |
npm install netlify-cli --save-dev
netlify deploy --dir ./out/netlify --site silent-teacher --alias preview --auth ${{ secrets.WEBSITE_NETLIFY_AUTH_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: dotnet clean ./implement/test-elm-time/test-elm-time.csproj && dotnet nuget locals all --clear

- name: dotnet publish
run: dotnet publish -c Debug -r ${{ matrix.publish-runtime-id }} --self-contained true -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --output ./dotnet-build ./implement/elm-time
run: dotnet publish -c Debug -r ${{ matrix.publish-runtime-id }} --self-contained true -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --output ./dotnet-build ./implement/pine

- name: Copy artifacts to publish
shell: pwsh
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: |
dotnet test ./implement/PineTest/Pine.UnitTests/Pine.UnitTests.csproj --logger "trx" --diag "./implement/PineTest/Pine.UnitTests/TestResults/diag-log.txt" --verbosity diagnostic
- name: Run Elm-Time tests with dotnet test
- name: Run tests with dotnet test
run: |
dotnet test ./implement/test-elm-time/test-elm-time.csproj --logger "trx" --diag "./implement/test-elm-time/TestResults/diag-log.txt" --verbosity diagnostic
Expand All @@ -63,36 +63,36 @@ jobs:
./implement/**/TestResults/**/*.trx
./implement/**/TestResults/**/*.json
- name: dotnet publish Elm-Time
run: dotnet publish -c Debug -r ${{ matrix.publish-runtime-id }} --self-contained true -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --output ./dotnet-build ./implement/elm-time
- name: dotnet publish Pine
run: dotnet publish -c Debug -r ${{ matrix.publish-runtime-id }} --self-contained true -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --output ./dotnet-build ./implement/pine

- name: Copy artifacts to publish
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path "./publish";
Get-ChildItem -Path "./dotnet-build/" -Filter "elm-time*" | ForEach-Object { Copy-Item -Path $_.FullName -Destination "./publish/" }
Get-ChildItem -Path "./dotnet-build/" -Filter "pine*" | ForEach-Object { Copy-Item -Path $_.FullName -Destination "./publish/" }
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: elm-time-bin-${{ github.sha }}-${{ matrix.publish-runtime-id }}
name: pine-bin-${{ github.sha }}-${{ matrix.publish-runtime-id }}
path: ./publish

- name: dotnet publish with separate assemblies
run: dotnet publish -c Debug ./implement/elm-time --output ./publish-separate-assemblies
run: dotnet publish -c Debug ./implement/pine --output ./publish-separate-assemblies

- name: Publish artifacts with separate assemblies
uses: actions/upload-artifact@v4
with:
name: elm-time-separate-assemblies-${{ github.sha }}-${{ matrix.publish-runtime-id }}
name: pine-separate-assemblies-${{ github.sha }}-${{ matrix.publish-runtime-id }}
path: ./publish-separate-assemblies

- name: self-test
run: ./publish/elm-time self-test
run: ./publish/pine self-test

- name: Elm App Compiler - Run tests with elm-time elm-test-rs
- name: Elm App Compiler - Run tests with pine elm-test-rs
# Adapt to elm-test-rs crashing on macOS
# elm-test-rs also wrote the following before crashing:
# elm: security: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
if: ${{ !contains( matrix.environment, 'macos') }}
run: ./publish/elm-time elm-test-rs ./implement/elm-time/ElmTime/compile-elm-program
run: ./publish/pine elm-test-rs ./implement/pine/ElmTime/compile-elm-program
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps:
inputs:
command: restore
projects: |
**/elm-time.csproj
**/pine.csproj
**/test-elm-time.csproj
- task: DotNetCoreCLI@2
Expand All @@ -39,5 +39,5 @@ steps:
testRunner: VSTest
testResultsFiles: '**/*.trx'

- script: dotnet publish ./implement/elm-time/elm-time.csproj
- script: dotnet publish ./implement/pine/pine.csproj
displayName: 'publish web host'
4 changes: 2 additions & 2 deletions guide/elm-silent-teacher.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Elm Silent Teacher is a game teaching the basics of programming. Through a serie
The default course teaches syntax and the core library of Elm, a programming language used to build websites, games, bots, and other kinds of apps.

+ To try an example course, visit <https://silent-teacher.netlify.app/>
+ Elm Silent Teacher is open-source; you can find the code at <https://github.com/pine-vm/pine/tree/main/implement/elm-time/ElmTime/learn-elm>
+ You can modify the exercises and customize the learning path in the [`Exercise` module](https://github.com/pine-vm/pine/blob/main/implement/elm-time/ElmTime/learn-elm/src/Frontend/ElmSilentTeacher/Exercise.elm)
+ Elm Silent Teacher is open-source; you can find the code at <https://github.com/pine-vm/pine/tree/main/implement/pine/ElmTime/learn-elm>
+ You can modify the exercises and customize the learning path in the [`Exercise` module](https://github.com/pine-vm/pine/blob/main/implement/pine/ElmTime/learn-elm/src/Frontend/ElmSilentTeacher/Exercise.elm)
+ A blog post on Elm Silent Teacher is at <https://michaelrätzel.com/blog/elm-silent-teacher-an-interactive-way-to-learn-elm>
10 changes: 5 additions & 5 deletions implement/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ WORKDIR /app

# Copy everything and build
COPY . ./
WORKDIR /app/elm-time
WORKDIR /app/pine
RUN dotnet publish -c Debug -o out

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0.4 AS binaries

COPY --from=build-env /app/elm-time/out /elm-time/dotnet/
COPY --from=build-env /app/pine/out /pine/dotnet/

# Build the process with a deployment for the default app.
FROM binaries AS build-default-config
Expand All @@ -22,10 +22,10 @@ RUN apt install -y git

COPY ./example-apps/docker-image-default-app /docker-image-default-app/

RUN dotnet "/elm-time/dotnet/elm-time.dll" deploy /docker-image-default-app/ /elm-time/process-store --init-app-state
RUN dotnet "/pine/dotnet/pine.dll" deploy /docker-image-default-app/ /pine/process-store --init-app-state

WORKDIR /elm-time
WORKDIR /pine

ENTRYPOINT ["dotnet", "/elm-time/dotnet/elm-time.dll", "run-server", "--process-store=/elm-time/process-store"]
ENTRYPOINT ["dotnet", "/pine/dotnet/pine.dll", "run-server", "--process-store=/pine/process-store"]

# ENV APPSETTING_adminPassword="password-for-admin-interface"
2 changes: 1 addition & 1 deletion implement/Pine.Core/Json/JsonConverterForChoiceType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Pine.Json;
///
/// This JSON converter factory supports the approach of representing choice types as records in C#.
///
/// For more information, see the guide in the file https://github.com/pine-vm/pine/blob/main/implement/Pine/Json/JsonConverterForChoiceType.md
/// For more information, see the guide in the file https://github.com/pine-vm/pine/blob/main/implement/Pine.Core/Json/JsonConverterForChoiceType.md
/// </summary>
public class JsonConverterForChoiceType : JsonConverterFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#r "System.Text.Json"

#r "Pine.Core"
#r "pine-cli"
#r "pine"

using Pine;
using System;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>ElmTime</RootNamespace>
<AssemblyName>pine-cli</AssemblyName>
<AssemblyName>pine</AssemblyName>
<AssemblyVersion>0.1.9</AssemblyVersion>
<FileVersion>0.1.9</FileVersion>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion implement/test-elm-time/LoadFromGitHubTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public void LoadFromGitHub_Partial_Cache()

var server = Pine.GitPartialForCommitServer.Run(
urls: [serverUrl],
gitCloneUrlPrefixes: ["https://github.com/elm-time/"],
gitCloneUrlPrefixes: ["https://github.com/pine-vm/"],
fileCacheDirectory: System.IO.Path.Combine(tempWorkingDirectory, "server-cache"));

IImmutableDictionary<IReadOnlyList<string>, ReadOnlyMemory<byte>> consultServer(
Expand Down
2 changes: 1 addition & 1 deletion implement/test-elm-time/test-elm-time.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\elm-time\elm-time.csproj" />
<ProjectReference Include="..\pine\pine.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit acb8a84

Please sign in to comment.