This repository was archived by the owner on Mar 24, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
132 lines (108 loc) · 3.55 KB
/
runtime.yaml
File metadata and controls
132 lines (108 loc) · 3.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Build Globe Runtime Shared Library
on:
push:
branches:
- main
tags:
- "*"
pull_request:
jobs:
Build:
name: Build - ${{ matrix.platform.os-name }}
strategy:
matrix:
platform:
- os-name: MacOS-x86_64
runs-on: macos-15-intel
target: x86_64-apple-darwin
- os-name: MacOS-aarch64
runs-on: macos-15
target: aarch64-apple-darwin
- os-name: Linux-x86_64
runs-on: ubuntu-22.04
target: x86_64-unknown-linux-gnu
- os-name: Linux-aarch64
runs-on: ubuntu-22.04-arm
target: aarch64-unknown-linux-gnu
- os-name: Windows-x86_64
runs-on: windows-2025
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.platform.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build Shared Library
uses: houseabsolute/actions-rust-cross@v1
with:
command: build
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true
- name: Find built shared library
id: find_artifact
shell: bash
run: |
echo "Locating build artifact..."
if [[ "${{ matrix.platform.target }}" == *"windows"* ]]; then
EXT="dll"
elif [[ "${{ matrix.platform.target }}" == *"apple"* ]]; then
EXT="dylib"
else
EXT="so"
fi
ARTIFACT_GLOB="target/${{ matrix.platform.target }}/release/*.${EXT}"
ARTIFACT_FILE=$(ls $ARTIFACT_GLOB 2>/dev/null || true)
if [[ -z "$ARTIFACT_FILE" ]]; then
echo "Error: No built library found at $ARTIFACT_GLOB"
exit 1
fi
echo "artifact_path=$ARTIFACT_FILE" >> $GITHUB_OUTPUT
echo "Found artifact: $ARTIFACT_FILE"
# Prepare new filename
BASENAME=$(basename "$ARTIFACT_FILE")
NEW_NAME="${BASENAME%.*}-${{ matrix.platform.target }}.${EXT}"
mv "$ARTIFACT_FILE" "$NEW_NAME"
echo "artifact_path=$NEW_NAME" >> $GITHUB_ENV
- name: Upload built library as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_path }}
path: ${{ env.artifact_path }}
Test:
needs: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Linux x86_64 artifact
uses: actions/download-artifact@v4
with:
name: libglobe_runtime-x86_64-unknown-linux-gnu.so
path: ./artifacts
- name: Add library path to environment
run: |
LIB_PATH="${GITHUB_WORKSPACE}/artifacts/libglobe_runtime-x86_64-unknown-linux-gnu.so"
echo "GLOBE_RUNTIME_LIB_PATH=${LIB_PATH}" >> $GITHUB_ENV
echo "Library path set to: ${LIB_PATH}"
ls -la "${LIB_PATH}"
- uses: dart-lang/setup-dart@v1
- name: Run Dart Tests
working-directory: packages/globe_runtime
run: dart test --reporter expanded --concurrency=1
Release:
name: Publish Release
if: github.ref_type == 'tag'
needs: Build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist/
- name: List downloaded artifacts
run: ls -R dist/
- name: Publish all artifacts to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/**/*