-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds release binaries for the following targets - aarch64-unknown-linux-gnu - aarch64-unknown-linux-musl - x86_64-apple-darwin - x86_64-pc-windows-gnu - x86_64-unknown-linux-gnu - x86_64-unknown-linux-musl
- Loading branch information
Showing
93 changed files
with
7,388 additions
and
11,728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
################################################## | ||
# Notes | ||
# rustc --print target-list | ||
# https://doc.rust-lang.org/reference/linkage.html | ||
################################################## | ||
|
||
################################################## | ||
[build] | ||
################################################## | ||
|
||
################################################## | ||
[rust] | ||
################################################## | ||
|
||
channel = "stable" | ||
lld = true | ||
|
||
################################################## | ||
[target.x86_64-apple-darwin] | ||
################################################## | ||
|
||
linker = "clang" | ||
|
||
rustflags = [] | ||
|
||
################################################## | ||
[target.x86_64-unknown-linux-gnu] | ||
################################################## | ||
|
||
linker = "clang" | ||
|
||
rustflags = ["-C", "link-arg=-fuse-ld=lld"] | ||
|
||
################################################## | ||
[target.x86_64-unknown-linux-musl] | ||
################################################## | ||
|
||
linker = "clang" | ||
|
||
rustflags = ["-C", "link-arg=-fuse-ld=lld", "-C", "relocation-model=static"] | ||
|
||
################################################## | ||
[target.aarch64-unknown-linux-gnu] | ||
################################################## | ||
|
||
linker = "aarch64-linux-gnu-gcc" | ||
|
||
rustflags = [] | ||
|
||
################################################## | ||
[target.aarch64-unknown-linux-musl] | ||
################################################## | ||
|
||
linker = "aarch64-linux-musl-gcc" | ||
|
||
rustflags = ["-C", "relocation-model=static"] | ||
|
||
################################################## | ||
[target.x86_64-pc-windows-gnu] | ||
################################################## | ||
|
||
linker = "x86_64-w64-mingw32-gcc" | ||
|
||
rustflags = [] | ||
|
||
################################################## | ||
[target.x86_64-pc-windows-msvc] | ||
################################################## | ||
|
||
linker = "lld-link.exe" | ||
|
||
rustflags = ["-C", "link-arg=-fuse-ld=lld"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,12 @@ | |
For example; 'x86_64-apple-darwin, release' | ||
.PARAMETER OutputDir | ||
Optional output directory to use for the archive. | ||
If not provided, defaults to current directory. | ||
.PARAMETER LogLevel | ||
Optional log level to use for the script output. | ||
|
@@ -51,6 +57,11 @@ | |
Creation Date: 17/06/2020 | ||
Purpose/Change: Initial script development | ||
Version: 0.2 | ||
Author: [email protected] | ||
Creation Date: 29/03/2023 | ||
Purpose/Change: Add parameter OutputDir | ||
.EXAMPLE | ||
./archive.ps1 -Target "${{ matrix.target }}" | ||
|
@@ -185,6 +196,15 @@ Param( | |
[String] | ||
$LogLevel = "Information", | ||
|
||
# Parameter: OutputDir | ||
[Parameter( | ||
Mandatory = $False, | ||
HelpMessage = "[OPTIONAL]: The output directory for the build." | ||
)] | ||
[ValidateNotNullOrEmpty()] | ||
[String] | ||
$OutputDir = "$PWD", | ||
|
||
# Parameter: Project | ||
[Parameter( | ||
Mandatory = $False, | ||
|
@@ -239,7 +259,7 @@ Begin { | |
$ScriptFileName = $ScriptInvocation.MyCommand.Name | ||
|
||
# Script Version | ||
$ScriptVersion = "0.1" | ||
$ScriptVersion = "0.2" | ||
|
||
# Set the Script Name so it can be used in logs, matching the filename with no extension | ||
$ScriptName = [System.IO.Path]::GetFilenameWithoutExtension($ScriptFileName) | ||
|
@@ -776,8 +796,8 @@ Begin { | |
} | ||
Write-Log -LogLevel "Debug" -LogMessage "Project set to $Project" | ||
|
||
# Define the archive name | ||
$Archive = "$Project-$Target.zip" | ||
# Define the full archive name | ||
$Archive = "$OutputDir/$Project-$Target.zip" | ||
|
||
# Define the release directory | ||
$Release = "target/$Target/release" | ||
|
@@ -794,6 +814,19 @@ Process { | |
|
||
Try { | ||
|
||
# Make sure the output directory exists | ||
If ( -not ( Test-Path -PathType Container -Path "$OutputDir" ) ) { | ||
|
||
Write-Log -LogLevel "Information" -LogMessage "Creating output directory $OutputDir" | ||
|
||
If ( $PScmdlet.ShouldProcess( "Directory", "Create Output Directory" ) ) { | ||
|
||
New-Item -ItemType Directory -Path "$OutputDir" | Out-Null | ||
|
||
} | ||
|
||
} | ||
|
||
# If the zip archive already exists, abort | ||
If ( Test-Path "$Archive" ) { | ||
|
||
|
Oops, something went wrong.