ci: fix build-tool on mac arm64 #3
Workflow file for this run
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
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-cli-tool-mac-universal.tar.gz releases | |
- name: Package Windows Release | |
run: | | |
mkdir -p orca-win/bin | |
mkdir -p orca-win/orca-libc | |
mkdir -p orca-win/resources | |
mkdir -p orca-win/src | |
# gather fonts | |
cp repo/resources/* orca-win/resources | |
# gather cli-tool | |
cp artifacts/orca.exe orca-win/bin | |
# gather runtime | |
cd artifacts | |
tar -xzf orca-runtime-win.tar.gz | |
cd .. | |
cp artifacts/orca-runtime-win/bin/runtime.obj orca-win/bin | |
cp artifacts/orca-runtime-win/bin/orca.dll orca-win/bin | |
cp artifacts/orca-runtime-win/bin/orca.dll.lib orca-win/bin | |
cp artifacts/orca-runtime-win/bin/wasm3.lib orca-win/bin | |
# gather source code | |
cp -r artifacts/src-win/* orca-win/src | |
# TODO(shaw): gather orca-libc once it is built by ci | |
# generate checksum file | |
find orca-win -type f -exec sha1sum {} + | LC_ALL=C sort | sha1sum | cut -z -f 1 -d " " > sha1.sum | |
# create release tarball | |
tar --format=ustar -czf orca-win.tar.gz orca-win sha1.sum | |
mv orca-win.tar.gz releases | |
- name: Package Mac x64 Release | |
run: | | |
mkdir -p orca-mac-x64/bin | |
mkdir -p orca-mac-x64/orca-libc | |
mkdir -p orca-mac-x64/resources | |
mkdir -p orca-mac-x64/src | |
# gather fonts | |
cp repo/resources/* orca-mac-x64/resources | |
# gather cli-tool | |
cd artifacts | |
tar -xzf orca-cli-tool-mac-universal.tar.gz | |
cd .. | |
cp artifacts/orca orca-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-mac-x64/bin | |
cp artifacts/orca-runtime-mac-x64/bin/liborca.dylib orca-mac-x64/bin | |
cp artifacts/orca-runtime-mac-x64/bin/mtl_renderer.metallib orca-mac-x64/bin | |
# gather source code | |
cp -r artifacts/src-mac-x64/* orca-mac-x64/src | |
# TODO(shaw): gather orca-libc once it is built by ci | |
# generate checksum file | |
find orca-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-mac-x64.tar.gz orca-mac-x64 sha1.sum | |
mv orca-mac-x64.tar.gz releases | |
- name: Package Mac arm64 Release | |
run: | | |
mkdir -p orca-mac-arm64/bin | |
mkdir -p orca-mac-arm64/orca-libc | |
mkdir -p orca-mac-arm64/resources | |
mkdir -p orca-mac-arm64/src | |
# gather fonts | |
cp repo/resources/* orca-mac-arm64/resources | |
# gather cli-tool | |
cd artifacts | |
tar -xzf orca-cli-tool-mac-universal.tar.gz | |
cd .. | |
cp artifacts/orca orca-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-mac-arm64/bin | |
cp artifacts/orca-runtime-mac-arm64/bin/liborca.dylib orca-mac-arm64/bin | |
cp artifacts/orca-runtime-mac-arm64/bin/mtl_renderer.metallib orca-mac-arm64/bin | |
# gather source code | |
cp -r artifacts/src-mac-arm64/* orca-mac-arm64/src | |
# TODO(shaw): gather orca-libc once it is built by ci | |
# generate checksum file | |
find orca-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-mac-arm64.tar.gz orca-mac-arm64 sha1.sum | |
mv orca-mac-arm64.tar.gz releases | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "releases/*" |