Skip to content

Commit

Permalink
Compilation fix (#94)
Browse files Browse the repository at this point in the history
* Compilation fix

* Fix Docker build

* Attestation fix
  • Loading branch information
masesdevelopers authored Sep 24, 2024
1 parent c368e5f commit ae88e92
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
uses: actions/attest-build-provenance@v1
id: attest
with:
subject-name: ghcr.io/${{ github.repository_owner }}/jnet
subject-name: ghcr.io/${{ github.repository_owner }}/netdroid_sdk
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

Expand Down Expand Up @@ -223,12 +223,12 @@ jobs:
uses: actions/attest-build-provenance@v1
id: attest
with:
subject-name: ghcr.io/${{ github.repository_owner }}/jnet
subject-name: ghcr.io/${{ github.repository_owner }}/netdroid
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

# Now run "build_windows"
build_windows:
# Now run "build_project"
build_project:
needs: check_changes
if: "always() && needs.check_changes.outputs.run_build_windows == 'true'"
# The type of runner that the job will run on
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
uses: actions/attest-build-provenance@v1
id: attest
with:
subject-name: ghcr.io/${{ github.repository_owner }}/jnet
subject-name: ghcr.io/${{ github.repository_owner }}/netdroid
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

Expand Down Expand Up @@ -176,6 +176,6 @@ jobs:
uses: actions/attest-build-provenance@v1
id: attest
with:
subject-name: ghcr.io/${{ github.repository_owner }}/jnet
subject-name: ghcr.io/${{ github.repository_owner }}/netdroid_sdk
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "3dparty/JNet"]
path = 3dparty/JNet
path = src/3dparty/JNet
url = https://github.com/masesgroup/JNet
6 changes: 3 additions & 3 deletions src/container/Dockerfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ ARG TARGETARCH
WORKDIR /app

# Copy everything
COPY ./src/net ./
COPY ./src ./
ENV NETDROID_DOCKER_BUILD_ACTIONS=true
# Restore as distinct layers
RUN dotnet restore Netdroid.sln -a $TARGETARCH
RUN dotnet restore ./net/Netdroid.sln -a $TARGETARCH
# Build and publish a release
RUN dotnet publish ./NetdroidCLI/NetdroidCLI.csproj --self-contained -p:PublishReadyToRun=true --framework net8.0 -c Release -o out -a $TARGETARCH
RUN dotnet publish ./net/NetdroidCLI/NetdroidCLI.csproj --self-contained -p:PublishReadyToRun=true --framework net8.0 -c Release -o out -a $TARGETARCH

# Build runtime image
FROM ubuntu:22.04
Expand Down
6 changes: 3 additions & 3 deletions src/container/DockerfileSDK.linux
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ ARG TARGETARCH
WORKDIR /app

# Copy everything
COPY ./src/net ./
COPY ./src ./
ENV NETDROID_DOCKER_BUILD_ACTIONS=true
# Restore as distinct layers
RUN dotnet restore Netdroid.sln -a $TARGETARCH
RUN dotnet restore ./net/Netdroid.sln -a $TARGETARCH
# Build and publish a release
RUN dotnet publish ./NetdroidCLI/NetdroidCLI.csproj --self-contained -p:PublishReadyToRun=true --framework net8.0 -c Release -o out -a $TARGETARCH
RUN dotnet publish ./net/NetdroidCLI/NetdroidCLI.csproj --self-contained -p:PublishReadyToRun=true --framework net8.0 -c Release -o out -a $TARGETARCH

# Build runtime image
FROM ubuntu:22.04
Expand Down
2 changes: 1 addition & 1 deletion src/net/Netdroid/DevelopedJNet
2 changes: 1 addition & 1 deletion src/net/Netdroid/JNetCoreBase.cs
2 changes: 1 addition & 1 deletion src/net/Netdroid/SpecificJNet
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected override string[] ProcessCommandLine()

List<string> namespaceList = new List<string>();

var netdroidAssembly = typeof(NetdroidCoreBase<>).Assembly;
var netdroidAssembly = typeof(NetdroidCore<>).Assembly;
foreach (var item in netdroidAssembly.GetExportedTypes())
{
if (item.IsPublic)
Expand Down
4 changes: 2 additions & 2 deletions src/net/NetdroidCLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static async Task Main(string[] args)

if (NetdroidCLICore.Interactive)
{
ScriptOptions options = ScriptOptions.Default.WithReferences(typeof(NetdroidCoreBase<>).Assembly)
ScriptOptions options = ScriptOptions.Default.WithReferences(typeof(NetdroidCore<>).Assembly)
.WithImports(NetdroidCLICore.NamespaceList);
ScriptState<object> state = null;
while (true)
Expand Down Expand Up @@ -85,7 +85,7 @@ static async Task Main(string[] args)

var scriptCode = File.ReadAllText(NetdroidCLICore.Script);

ScriptOptions options = ScriptOptions.Default.WithReferences(typeof(NetdroidCoreBase<>).Assembly)
ScriptOptions options = ScriptOptions.Default.WithReferences(typeof(NetdroidCore<>).Assembly)
.WithImports(NetdroidCLICore.NamespaceList);

var script = CSharpScript.Create(scriptCode, options);
Expand Down

0 comments on commit ae88e92

Please sign in to comment.