Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikMennen committed Oct 19, 2023
2 parents b13b346 + ee98026 commit 1c272c9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 43 deletions.
62 changes: 21 additions & 41 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,39 @@ on:

jobs:
build:

strategy:
matrix:
target: ["win-x64", "linux-x64", "osx-x64", "osx-arm64"]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Build Windows-x64
run: dotnet build OneWare.Ghdl/OneWare.Ghdl.csproj -c Release -r win-x64 -o publish-win-x64
- uses: actions/upload-artifact@v3
dotnet-version: 7.0.x
- name: Get Version
uses: kzrnm/[email protected]
id: get-version
with:
name: OneWare_GhdlExtension_win-x64
if-no-files-found: error
retention-days: 7
path: ./publish-win-x64
- name: Build Linux-x64
run: dotnet build OneWare.Ghdl/OneWare.Ghdl.csproj -c Release -r linux-x64 -o publish-linux-x64
- uses: actions/upload-artifact@v3
proj-path: OneWare.Ghdl/OneWare.Ghdl.csproj
- name: Build ${{ matrix.target }}
run: dotnet build OneWare.Ghdl/OneWare.Ghdl.csproj -c Release -r ${{ matrix.target }} -o publish
- name: Compress ${{ matrix.target }}
uses: thedoctor0/[email protected]
with:
name: OneWare_GhdlExtension_linux-x64
if-no-files-found: error
retention-days: 7
path: ./publish-linux-x64
- name: Build osx-x64
run: dotnet build OneWare.Ghdl/OneWare.Ghdl.csproj -c Release -r osx-x64 -o publish-osx-x64
type: 'zip'
filename: ../OneWare_GhdlExtension_${{steps.get-version.outputs.version}}_${{ matrix.target }}.zip
directory: ./publish
- uses: actions/upload-artifact@v3
with:
name: OneWare_GhdlExtension_osx-x64
name: OneWare_GhdlExtension_${{ matrix.target }}
if-no-files-found: error
retention-days: 7
path: ./publish-osx-x64
path: ./OneWare_GhdlExtension_${{steps.get-version.outputs.version}}_${{ matrix.target }}.zip

release:
runs-on: ubuntu-latest
Expand All @@ -54,35 +52,17 @@ jobs:
needs: [ build ]
steps:
- uses: actions/checkout@v3
- name: get-net-sdk-project-versions-action
- name: Get Version
uses: kzrnm/[email protected]
id: get-version
with:
proj-path: OneWare.Ghdl/OneWare.Ghdl.csproj
- uses: actions/download-artifact@v3
with:
path: ./artifacts
- name: Archive Release Win-x64
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: ../OneWare_GhdlExtension_${{steps.get-version.outputs.version}}_win-x64.zip
directory: ./artifacts/OneWare_GhdlExtension_win-x64
- name: Archive Release Linux-x64
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: ../OneWare_GhdlExtension_${{steps.get-version.outputs.version}}_linux-x64.zip
directory: ./artifacts/OneWare_GhdlExtension_linux-x64
- name: Archive Release Osx-x64
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: ../OneWare_GhdlExtension_${{steps.get-version.outputs.version}}_osx-x64.zip
directory: ./artifacts/OneWare_GhdlExtension_osx-x64
- uses: ncipollo/release-action@v1
with:
artifacts: "artifacts/**.zip"
artifacts: "artifacts/**/*.zip"
tag: ${{steps.get-version.outputs.version}}
allowUpdates: true

7 changes: 6 additions & 1 deletion OneWare.Ghdl/OneWare.Ghdl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@
<ExternalPackageUrl>https://github.com/ghdl/ghdl/releases/download/v3.0.0/ghdl-gha-ubuntu-20.04-mcode.tgz</ExternalPackageUrl>
</PropertyGroup>

<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'osx-x64' OR ('$(RuntimeIdentifier)' == '' AND $([MSBuild]::IsOSPlatform('OSX')))">
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'osx-x64' OR ('$(RuntimeIdentifier)' == '' AND ($([MSBuild]::IsOSPlatform('OSX')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64' ))">
<UsePackageTarget>osx-x64</UsePackageTarget>
<ExternalPackageUrl>https://github.com/ghdl/ghdl/releases/download/v3.0.0/ghdl-macos-11-mcode.tgz</ExternalPackageUrl>
</PropertyGroup>

<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'osx-arm64' OR ('$(RuntimeIdentifier)' == '' AND ($([MSBuild]::IsOSPlatform('OSX')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64' ))">
<UsePackageTarget>osx-arm64</UsePackageTarget>
<ExternalPackageUrl>https://github.com/ghdl/ghdl/releases/download/v3.0.0/ghdl-macos-11-mcode.tgz</ExternalPackageUrl>
</PropertyGroup>

<PropertyGroup>
<PackageName>ghdl</PackageName>
<ExtractionFolder>native_tools/$(UsePackageTarget)/$(PackageName)</ExtractionFolder>
Expand Down
2 changes: 1 addition & 1 deletion OneWare.Ghdl/Services/GhdlService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private static ProcessStartInfo GetGhdlProcessStartInfo(string workingDirectory,
PlatformId.WinX64 => $"{assemblyPath}/native_tools/win-x64/ghdl/GHDL/bin/ghdl.exe",
PlatformId.LinuxX64 => $"{assemblyPath}/native_tools/linux-x64/ghdl/GHDL/bin/ghdl",
PlatformId.OsxX64 => $"{assemblyPath}/native_tools/osx-x64/ghdl/GHDL/bin/ghdl",
PlatformId.OsxArm64 => $"{assemblyPath}/native_tools/osx-x64/ghdl/GHDL/bin/ghdl",
PlatformId.OsxArm64 => $"{assemblyPath}/native_tools/osx-arm64/ghdl/GHDL/bin/ghdl",
_ => null,
};

Expand Down
4 changes: 4 additions & 0 deletions oneware-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
{
"target": "osx-x64",
"url": "https://github.com/ProtopSolutions/OneWare.GhdlExtension/releases/download/0.12.0.2/OneWare_GhdlExtension_0.12.0.2_osx-x64.zip"
},
{
"target": "osx-arm64",
"url": "https://github.com/ProtopSolutions/OneWare.GhdlExtension/releases/download/0.12.0.2/OneWare_GhdlExtension_0.12.0.2_osx-arm64.zip"
}
]
}
Expand Down

0 comments on commit 1c272c9

Please sign in to comment.