Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
external
dist
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ build --incompatible_enable_cc_toolchain_resolution
build --incompatible_strict_action_env

build:windows --platforms=//bazel/platforms:windows
build:windows --host_platform=//bazel/platforms:windows

build:linux --platforms=//bazel/platforms:linux
build:linux --host_platform=//bazel/platforms:linux
build:linux --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux

common:ci --announce_rc
common:ci --disk_cache=~/.cache/bazel-disk-cache
build:ci -c opt

try-import %workspace%/user.bazelrc
117 changes: 117 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Release

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+"

jobs:
release-draft:
runs-on: ubuntu-latest
steps:
- uses: softprops/action-gh-release@v1

windows-x64-binaries:
runs-on: windows-latest
steps:
- name: Get Home Directory
id: get_home_dir
run: echo "::set-output name=dir::$HOME"
- uses: actions/cache@v3
with:
path: |
/Users/runneradmin/AppData/Local/bazelisk
/Users/runneradmin/.cache/bazel-disk-cache
key: ${{runner.os}}-bazel-cache
- uses: actions/checkout@v3
- run: bazel run --config=ci //:copy_dist_bin
- run: bazel run --config=ci //:copy_dist_codegen_plugins
- uses: actions/upload-artifact@v3
with:
name: windows-x64-binaries
path: dist
linux-x64-binaries:
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: |
~/.cache/bazelisk
~/.cache/bazel-disk-cache
key: ${{runner.os}}-bazel-cache
- uses: actions/checkout@v3
- run: bazel run --config=ci //:copy_dist_bin
- run: bazel run --config=ci //:copy_dist_codegen_plugins
- uses: actions/upload-artifact@v3
with:
name: linux-x64-binaries
path: dist

linux-x64-archive:
runs-on: ubuntu-latest
needs:
- linux-x64-binaries
steps:
- uses: actions/download-artifact@v3
with:
name: linux-x64-binaries
- run: tar -czf ecsact_sdk_${{github.ref_name}}_linux_x64.tar.gz bin include
- uses: actions/upload-artifact@v3
with:
name: linux-x64-archive
path: ecsact_sdk_${{github.ref_name}}_linux_x64.tar.gz

windows-x64-archive:
runs-on: ubuntu-latest
needs:
- windows-x64-binaries
steps:
- uses: actions/download-artifact@v3
with:
name: windows-x64-binaries
- run: >
zip -r ecsact_sdk_${{github.ref_name}}_windows_x64.zip bin include
- uses: actions/upload-artifact@v3
with:
name: windows-x64-archive
path: ecsact_sdk_${{github.ref_name}}_windows_x64.zip

release-upload-linux-x64-archive:
runs-on: ubuntu-latest
needs:
- release-draft
- linux-x64-archive
steps:
- uses: actions/download-artifact@v3
with:
name: linux-x64-archive
- uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: ecsact_sdk_${{github.ref_name}}_linux_x64.tar.gz

release-upload-windows-x64-archive:
runs-on: ubuntu-latest
needs:
- release-draft
- windows-x64-archive
steps:
- uses: actions/download-artifact@v3
with:
name: windows-x64-archive
- uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: ecsact_sdk_${{github.ref_name}}_windows_x64.zip

release-finish:
runs-on: ubuntu-latest
needs:
- release-upload-windows-x64-archive
- release-upload-linux-x64-archive
steps:
- uses: softprops/action-gh-release@v1
with:
name: ${{github.ref_name}}
generate_release_notes: true
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@

# ecsact codegen
*.ecsact.*

# MSIX distribution folder
/dist/*
!/dist/AppxManifest.xml
!/dist/images
*.msix
*.zip
31 changes: 31 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
load("@bzlws//:index.bzl", "bzlws_copy")

bzlws_copy(
name = "copy_dist_bin",
srcs = [
"//cli:ecsact",
],
out = "dist/bin/{FILENAME}",
force = True,
)

bzlws_copy(
name = "copy_dist_include",
srcs = [
"@ecsact_runtime//:headers",
],
out = "dist/include/{FILEPATH}",
force = True,
)

bzlws_copy(
name = "copy_dist_codegen_plugins",
srcs = [
"@ecsact_lang_cpp//cpp_header_codegen",
"@ecsact_lang_cpp//cpp_systems_header_codegen",
"@ecsact_lang_cpp//systems_header_codegen",
"@ecsact_lang_csharp//csharp_codegen",
],
out = "dist/share/ecsact/plugins/{FILENAME}",
force = True,
)
6 changes: 6 additions & 0 deletions CreateMsix.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off

set /p "PASSWORD=Password: "

MSIXHeroCLI pack -d dist -p EcsactSdk.msix
MSIXHeroCLI sign --file %USERPROFILE%\Documents\Certificates\Seaube.pfx -p %PASSWORD% EcsactSdk.msix
31 changes: 31 additions & 0 deletions UploadMsix.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env pwsh

$ErrorActionPreference = 'Stop'

# GitHub requires TLS 1.2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

$LatestTag = (gh release list -L 1).split()[0]
Write-Host "Latest Tag: $LatestTag"

$ArchiveUrl = "https://github.com/ecsact-dev/ecsact_sdk/releases/download/$($LatestTag)/ecsact_sdk_$($LatestTag)_windows_x64.zip"
$ArchivePath = "ecsact_sdk_$($LatestTag)_windows_x64.zip"

Write-Host "Downloading $ArchiveUrl to $ArchivePath..."
Invoke-WebRequest $ArchiveUrl -OutFile $ArchivePath -UseBasicParsing

git clean dist -dfx
Write-Host "Extracting $ArchivePath to dist..."
Expand-Archive -Path $ArchivePath -DestinationPath dist

((Get-Content -path .\dist\AppxManifest.xml -Raw) -replace '0.0.0.0-placeholder',"$($LatestTag).0") | Set-Content -Path .\dist\AppxManifest.xml

try {
$MsixPath = "ecsact_sdk_$($LatestTag)_windows_x64.msix"
$CertPassword = Read-Host "Cert Password"
MSIXHeroCLI pack -d dist -p $MsixPath
MSIXHeroCLI sign --file $env:USERPROFILE\Documents\Certificates\Seaube.pfx -p $CertPassword $MsixPath
gh release upload $LatestTag $MsixPath
} finally {
git checkout .\dist\AppxManifest.xml
}
57 changes: 57 additions & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,41 @@ load("@boost//:index.bzl", "boost_http_archives")

boost_http_archives()

http_archive(
name = "ecsact_parse",
sha256 = "",
strip_prefix = "ecsact_parse-41e73763ecf19b675efb9a23f9b3fe8cac10d7b4",
url = "https://github.com/ecsact-dev/ecsact_parse/archive/41e73763ecf19b675efb9a23f9b3fe8cac10d7b4.zip",
)

http_archive(
name = "ecsact_runtime",
sha256 = "edf15d37e509163d0d1d8edad71536d125674f1757dacb338e7a665961788262",
strip_prefix = "ecsact_runtime-6c5afb2032b9ec343bd17e1da4d658d1a5c3429b",
url = "https://github.com/ecsact-dev/ecsact_runtime/archive/6c5afb2032b9ec343bd17e1da4d658d1a5c3429b.zip",
)

http_archive(
name = "ecsact_parse_runtime_interop",
sha256 = "d87bdae35c2d3d3d0588835adcb9137a9de123feebc95fad903b3277903ffa60",
strip_prefix = "ecsact_parse_runtime_interop-f3ff60a7d13bacd139b01073fb7feb68496860dc",
url = "https://github.com/ecsact-dev/ecsact_parse_runtime_interop/archive/f3ff60a7d13bacd139b01073fb7feb68496860dc.zip",
)

http_archive(
name = "ecsact_lang_cpp",
sha256 = "8a430ca8c92937403c0f879eca2a29da97662abd03901d11d8b419d97fa029b8",
strip_prefix = "ecsact_lang_cpp-bb88f875b3300f795ce72feab1b30109af9bbc64",
url = "https://github.com/ecsact-dev/ecsact_lang_cpp/archive/bb88f875b3300f795ce72feab1b30109af9bbc64.zip",
)

http_archive(
name = "ecsact_lang_csharp",
sha256 = "abaec7f347a4bb02017df4e85a9a2f74f54c2397fbc1f2277622d9517ff8c371",
strip_prefix = "ecsact_lang_csharp-8dc906f95836e1ea90b3644dae6e2890c10237b8",
url = "https://github.com/ecsact-dev/ecsact_lang_csharp/archive/8dc906f95836e1ea90b3644dae6e2890c10237b8.zip",
)

load("@ecsact_parse//:repositories.bzl", "ecsact_parse_dependencies")

ecsact_parse_dependencies()
Expand All @@ -31,6 +66,28 @@ http_archive(
url = "https://github.com/google/googletest/archive/25cc5777a17820a6339204a3552aa1dd5e428669.zip",
)

http_archive(
name = "bzlws",
sha256 = "9f52b3f339fb42e5a663b379eda56723fafb27c0fb3113152ee3a9229b059080",
strip_prefix = "bzlws-4042efa29a0359cf13f1b64e0bcd560c2d1dc4c2",
url = "https://github.com/zaucy/bzlws/archive/4042efa29a0359cf13f1b64e0bcd560c2d1dc4c2.zip",
)

load("@bzlws//:repo.bzl", "bzlws_deps")

bzlws_deps()

http_archive(
name = "rules_7zip",
sha256 = "29ba984e2a7d48540faa839efaf09be4b880d211a93575e7ac87abffc12dbdea",
strip_prefix = "rules_7zip-25d3b858a37580dbc1f1ced002e210be15012e2f",
urls = ["https://github.com/zaucy/rules_7zip/archive/25d3b858a37580dbc1f1ced002e210be15012e2f.zip"],
)

load("@rules_7zip//:setup.bzl", "setup_7zip")

setup_7zip()

http_archive(
name = "hedron_compile_commands",
sha256 = "c192482fc1d76eeec2c92d1dced179122b6bd2895ca0e7239aa4866ece7e096c",
Expand Down
31 changes: 31 additions & 0 deletions dist/AppxManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5" xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" xmlns:com2="http://schemas.microsoft.com/appx/manifest/com/windows10/2" xmlns:f2="http://schemas.microsoft.com/appx/manifest/foundation/windows10/2" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:desktop3="http://schemas.microsoft.com/appx/manifest/desktop/windows10/3" xmlns:rescap2="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/2" xmlns:rescap3="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/3" xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" xmlns:ray="http://schemas.raynet.de/msix/manifestextension" xmlns:rescap4="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/4" xmlns:uap7="http://schemas.microsoft.com/appx/manifest/uap/windows10/7" xmlns:uap6="http://schemas.microsoft.com/appx/manifest/uap/windows10/6" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4" xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" xmlns:rescap6="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/6" xmlns:desktop2="http://schemas.microsoft.com/appx/manifest/desktop/windows10/2" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:build="http://schemas.microsoft.com/developer/appx/2015/build" xmlns:uap8="http://schemas.microsoft.com/appx/manifest/uap/windows10/8" xmlns:desktop10="http://schemas.microsoft.com/appx/manifest/desktop/windows10/10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities">
<Identity Name="EcsactSdk" Version="0.0.0.0-placeholder" Publisher="CN=Seaube, C=Canada" />
<Properties>
<DisplayName>Ecsact SDK</DisplayName>
<PublisherDisplayName>Seaube</PublisherDisplayName>
<Logo>images\logo.png</Logo>
<Description>Ecsact development tools and runtime headers. https://ecsact.dev</Description>
</Properties>
<Resources>
<Resource Language="en-us" />
</Resources>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.18362.0" />
</Dependencies>
<Applications>
<Application Id="EcsactSdk.Ecsact" Executable="bin/ecsact.exe" EntryPoint="Windows.FullTrustApplication">
<uap3:VisualElements DisplayName="Ecsact CLI" Description="Ecsact Command Line Interface" BackgroundColor="transparent" Square44x44Logo="images/logo44.png" Square150x150Logo="images/logo150.png" AppListEntry="none" VisualGroup="Ecsact" />
<Extensions>
<uap3:Extension Category="windows.appExecutionAlias">
<uap3:AppExecutionAlias>
<uap8:ExecutionAlias Alias="ecsact.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>
Binary file added dist/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/images/logo150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/images/logo44.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading