-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from orca-app/c-tooling
C tooling: split the user tooling and the dev tooling. Provide a native tool and precompiled binaries for all the user workflows.
- Loading branch information
Showing
2,250 changed files
with
597,851 additions
and
1,003 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,77 @@ | ||
name: build-runtime | ||
|
||
on: | ||
workflow_call: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-win: | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Build | ||
shell: cmd | ||
run: | | ||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | ||
orcadev.bat build-runtime --release | ||
- name: Tarball | ||
shell: cmd | ||
run: | | ||
rename build orca-runtime-win | ||
rename src src-win | ||
tar -czf orca-runtime-win.tar.gz orca-runtime-win src-win | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: orca-runtime-win | ||
path: orca-runtime-win.tar.gz | ||
|
||
build-macos-x64: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Build | ||
run: | | ||
./orcadev build-runtime --release | ||
mv build orca-runtime-mac-x64 | ||
mv src src-mac-x64 | ||
tar --format=ustar -czf orca-runtime-mac-x64.tar.gz orca-runtime-mac-x64 src-mac-x64 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: orca-runtime-mac-x64 | ||
path: orca-runtime-mac-x64.tar.gz | ||
|
||
build-macos-arm64: | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Build | ||
run: | | ||
./orcadev build-runtime --release | ||
mv build orca-runtime-mac-arm64 | ||
mv src src-mac-arm64 | ||
tar --format=ustar -czf orca-runtime-mac-arm64.tar.gz orca-runtime-mac-arm64 src-mac-arm64 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: orca-runtime-mac-arm64 | ||
path: orca-runtime-mac-arm64.tar.gz |
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,111 @@ | ||
name: build-tool | ||
|
||
on: | ||
workflow_call: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-win: | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Build | ||
shell: cmd | ||
run: | | ||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | ||
orcadev.bat build-tool --release --version ${{github.ref_name}} | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: orca-win | ||
path: build/bin/orca.exe | ||
|
||
build-macos-x64: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Build | ||
run: ./orcadev build-tool --release --version ${{github.ref_name}} | ||
|
||
# NOTE: tar is needed to maintain executable file permissions | ||
- name: Tar | ||
run: | | ||
cp build/bin/orca orca | ||
tar -czf orca-mac-x64.tar.gz orca | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: orca-mac-x64 | ||
path: orca-mac-x64.tar.gz | ||
|
||
build-macos-arm64: | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Build | ||
run: ./orcadev build-tool --release --version ${{github.ref_name}} | ||
|
||
# NOTE: tar is needed to maintain executable file permissions | ||
- name: Tar | ||
run: | | ||
cp build/bin/orca orca | ||
tar -czf orca-mac-arm64.tar.gz orca | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: orca-mac-arm64 | ||
path: orca-mac-arm64.tar.gz | ||
|
||
mac-make-universal: | ||
runs-on: macos-latest | ||
needs: [build-macos-x64, build-macos-arm64] | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: orca-mac-x64 | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: orca-mac-arm64 | ||
|
||
- name: Untar | ||
run: | | ||
tar -xzf orca-mac-x64.tar.gz | ||
mv orca orca-mac-x64 | ||
tar -xzf orca-mac-arm64.tar.gz | ||
mv orca orca-mac-arm64 | ||
- name: Make universal binary | ||
run: | | ||
chmod +x orca-mac-x64 | ||
chmod +x orca-mac-arm64 | ||
lipo -create orca-mac-x64 orca-mac-arm64 -output orca | ||
- name: Tar | ||
run: | | ||
tar --format=ustar -czf orca-mac-universal.tar.gz orca | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: orca-mac-universal | ||
path: orca-mac-universal.tar.gz |
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,140 @@ | ||
name: create-release | ||
|
||
on: | ||
push: | ||
tags: [ "v[0-9]+.[0-9]+.[0-9]+", "test-release**" ] | ||
|
||
jobs: | ||
build-tool: | ||
uses: ./.github/workflows/build-tool.yaml | ||
|
||
build-runtime: | ||
uses: ./.github/workflows/build-runtime.yaml | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
needs: [build-tool, build-runtime] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: repo | ||
sparse-checkout: | | ||
resources | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
# when name is not specified, all artifacts from this run will be downloaded | ||
path: artifacts | ||
merge-multiple: true | ||
|
||
- name: Package CLI Tool | ||
run: | | ||
mkdir releases | ||
cp artifacts/orca.exe releases | ||
cp artifacts/orca-mac-universal.tar.gz releases/orca-mac.tar.gz | ||
- name: Package Windows Release | ||
run: | | ||
mkdir -p orca-sdk-windows/bin | ||
mkdir -p orca-sdk-windows/orca-libc | ||
mkdir -p orca-sdk-windows/resources | ||
mkdir -p orca-sdk-windows/src | ||
# gather fonts | ||
cp repo/resources/* orca-sdk-windows/resources | ||
# gather cli-tool | ||
cp artifacts/orca.exe orca-sdk-windows/bin | ||
# gather runtime | ||
cd artifacts | ||
tar -xzf orca-runtime-win.tar.gz | ||
cd .. | ||
cp artifacts/orca-runtime-win/bin/runtime.obj orca-sdk-windows/bin | ||
cp artifacts/orca-runtime-win/bin/orca.dll orca-sdk-windows/bin | ||
cp artifacts/orca-runtime-win/bin/orca.dll.lib orca-sdk-windows/bin | ||
cp artifacts/orca-runtime-win/bin/liborca_wasm.a orca-sdk-windows/bin | ||
cp artifacts/orca-runtime-win/bin/wasm3.lib orca-sdk-windows/bin | ||
cp artifacts/orca-runtime-win/bin/libEGL.dll orca-sdk-windows/bin | ||
cp artifacts/orca-runtime-win/bin/libGLESv2.dll orca-sdk-windows/bin | ||
# gather source code | ||
cp -r artifacts/src-win/* orca-sdk-windows/src | ||
# TODO(shaw): gather orca-libc once it is built by ci | ||
# generate checksum file | ||
find orca-sdk-windows -type f -exec sha1sum {} + | LC_ALL=C sort | sha1sum | cut -z -f 1 -d " " > sha1.sum | ||
# create release tarball | ||
tar --format=ustar -czf orca-sdk-windows.tar.gz orca-sdk-windows sha1.sum | ||
mv orca-sdk-windows.tar.gz releases | ||
- name: Package Mac x64 Release | ||
run: | | ||
mkdir -p orca-sdk-mac-x64/bin | ||
mkdir -p orca-sdk-mac-x64/orca-libc | ||
mkdir -p orca-sdk-mac-x64/resources | ||
mkdir -p orca-sdk-mac-x64/src | ||
# gather fonts | ||
cp repo/resources/* orca-sdk-mac-x64/resources | ||
# gather cli-tool | ||
cd artifacts | ||
tar -xzf orca-mac-universal.tar.gz | ||
cd .. | ||
cp artifacts/orca orca-sdk-mac-x64/bin | ||
# gather runtime | ||
cd artifacts | ||
tar -xzf orca-runtime-mac-x64.tar.gz | ||
cd .. | ||
cp artifacts/orca-runtime-mac-x64/bin/orca_runtime orca-sdk-mac-x64/bin | ||
cp artifacts/orca-runtime-mac-x64/bin/liborca.dylib orca-sdk-mac-x64/bin | ||
cp artifacts/orca-runtime-mac-x64/bin/liborca_wasm.a orca-sdk-mac-x64/bin | ||
cp artifacts/orca-runtime-mac-x64/bin/libEGL.dylib orca-sdk-mac-x64/bin | ||
cp artifacts/orca-runtime-mac-x64/bin/libGLESv2.dylib orca-sdk-mac-x64/bin | ||
cp artifacts/orca-runtime-mac-x64/bin/mtl_renderer.metallib orca-sdk-mac-x64/bin | ||
# gather source code | ||
cp -r artifacts/src-mac-x64/* orca-sdk-mac-x64/src | ||
# TODO(shaw): gather orca-libc once it is built by ci | ||
# generate checksum file | ||
find orca-sdk-mac-x64 -type f -exec sha1sum {} + | LC_ALL=C sort | sha1sum | cut -z -f 1 -d " " > sha1.sum | ||
# create release tarball | ||
tar --format=ustar -czf orca-sdk-mac-x64.tar.gz orca-sdk-mac-x64 sha1.sum | ||
mv orca-sdk-mac-x64.tar.gz releases | ||
- name: Package Mac arm64 Release | ||
run: | | ||
mkdir -p orca-sdk-mac-arm64/bin | ||
mkdir -p orca-sdk-mac-arm64/orca-libc | ||
mkdir -p orca-sdk-mac-arm64/resources | ||
mkdir -p orca-sdk-mac-arm64/src | ||
# gather fonts | ||
cp repo/resources/* orca-sdk-mac-arm64/resources | ||
# gather cli-tool | ||
cd artifacts | ||
tar -xzf orca-mac-universal.tar.gz | ||
cd .. | ||
cp artifacts/orca orca-sdk-mac-arm64/bin | ||
# gather runtime | ||
cd artifacts | ||
tar -xzf orca-runtime-mac-arm64.tar.gz | ||
cd .. | ||
cp artifacts/orca-runtime-mac-arm64/bin/orca_runtime orca-sdk-mac-arm64/bin | ||
cp artifacts/orca-runtime-mac-arm64/bin/liborca.dylib orca-sdk-mac-arm64/bin | ||
cp artifacts/orca-runtime-mac-arm64/bin/liborca_wasm.a orca-sdk-mac-arm64/bin | ||
cp artifacts/orca-runtime-mac-arm64/bin/libEGL.dylib orca-sdk-mac-arm64/bin | ||
cp artifacts/orca-runtime-mac-arm64/bin/libGLESv2.dylib orca-sdk-mac-arm64/bin | ||
cp artifacts/orca-runtime-mac-arm64/bin/mtl_renderer.metallib orca-sdk-mac-arm64/bin | ||
# gather source code | ||
cp -r artifacts/src-mac-arm64/* orca-sdk-mac-arm64/src | ||
# TODO(shaw): gather orca-libc once it is built by ci | ||
# generate checksum file | ||
find orca-sdk-mac-arm64 -type f -exec sha1sum {} + | LC_ALL=C sort | sha1sum | cut -z -f 1 -d " " > sha1.sum | ||
# create release tarball | ||
tar --format=ustar -czf orca-sdk-mac-arm64.tar.gz orca-sdk-mac-arm64 sha1.sum | ||
mv orca-sdk-mac-arm64.tar.gz releases | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "releases/*" |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
You are currently at the root of the Orca source. Welcome. | ||
|
||
This file exists to help the Orca dev tooling find the project root directory from anywhere inside. |
Oops, something went wrong.