@@ -59,3 +59,122 @@ jobs:
5959 IOS_TEST_VERBOSE_SPECS : " 1"
6060 IOS_SIMCTL_QUERY_TIMEOUT_MS : " 10000"
6161 run : npm run test:ios
62+
63+ engine-tests :
64+ name : macOS tests (${{ matrix.engine }})
65+ runs-on : macos-26
66+ strategy :
67+ fail-fast : false
68+ matrix :
69+ engine : [hermes, quickjs, jsc]
70+ steps :
71+ - uses : actions/checkout@v5
72+ with :
73+ submodules : ' recursive'
74+
75+ - name : Use Node.js
76+ uses : actions/setup-node@v4
77+ with :
78+ node-version : ' 24.x'
79+
80+ - name : Install dependencies
81+ run : npm install
82+
83+ - name : Install libffi build tools
84+ run : brew install autoconf automake libtool texinfo
85+
86+ - name : Build libffi
87+ run : npm run build-libffi
88+
89+ - name : Build metadata generator
90+ run : METADATA_GENERATOR_ARCHS="$(uname -m)" npm run build-metagen
91+
92+ - name : Generate macOS metadata
93+ run : npm run metagen macos
94+
95+ - name : Run macOS test suite
96+ env :
97+ MACOS_COMMAND_TIMEOUT_MS : " 1200000"
98+ MACOS_LOG_JUNIT : " 1"
99+ MACOS_TEST_ENGINE : ${{ matrix.engine }}
100+ MACOS_TEST_INACTIVITY_TIMEOUT_MS : " 180000"
101+ MACOS_TEST_TIMEOUT_MS : " 600000"
102+ MACOS_TEST_VERBOSE_SPECS : " 1"
103+ run : npm run test:macos -- ./build/test-results/macos-${{ matrix.engine }}-junit.xml
104+
105+ - name : Run iOS test suite
106+ env :
107+ IOS_BUILD_TIMEOUT_MS : " 1200000"
108+ IOS_LOG_JUNIT : " 1"
109+ IOS_SIMCTL_QUERY_TIMEOUT_MS : " 10000"
110+ IOS_TEST_ENGINE : ${{ matrix.engine }}
111+ IOS_TEST_INACTIVITY_TIMEOUT_MS : " 180000"
112+ IOS_TEST_TIMEOUT_MS : " 600000"
113+ IOS_TEST_VERBOSE_SPECS : " 1"
114+ run : npm run test:ios -- ./build/test-results/ios-${{ matrix.engine }}-junit.xml
115+
116+ performance :
117+ name : Performance (${{ matrix.engine }})
118+ if : github.event_name == 'pull_request' && github.base_ref != 'main'
119+ runs-on : macos-26
120+ strategy :
121+ fail-fast : false
122+ matrix :
123+ engine : [v8, hermes, quickjs, jsc]
124+ env :
125+ BASE_SHA : ${{ github.event.pull_request.base.sha }}
126+ CANDIDATE_SHA : ${{ github.event.pull_request.head.sha }}
127+ ENGINE : ${{ matrix.engine }}
128+ steps :
129+ - uses : actions/checkout@v5
130+ with :
131+ fetch-depth : 0
132+ ref : ${{ github.event.pull_request.head.sha }}
133+ submodules : ' recursive'
134+
135+ - name : Use Node.js
136+ uses : actions/setup-node@v4
137+ with :
138+ node-version : ' 24.x'
139+
140+ - name : Install dependencies
141+ run : npm install
142+
143+ - name : Install libffi build tools
144+ run : brew install autoconf automake libtool texinfo
145+
146+ - name : Build shared dependencies
147+ run : |
148+ npm run build-libffi
149+ METADATA_GENERATOR_ARCHS="$(uname -m)" npm run build-metagen
150+ npm run metagen macos
151+
152+ - name : Build candidate CLI
153+ run : |
154+ ./scripts/build_nativescript.sh --no-iphone --no-simulator --no-macos --macos-cli --${ENGINE}
155+ cp ./dist/nsr "${RUNNER_TEMP}/nsr-candidate-${ENGINE}"
156+ cp "./metadata-generator/metadata/metadata.macos.$(uname -m).nsmd" "${RUNNER_TEMP}/metadata-candidate-${ENGINE}.nsmd"
157+
158+ - name : Build base CLI
159+ run : |
160+ git checkout --detach "${BASE_SHA}"
161+ git submodule update --init --recursive
162+ npm install
163+ npm run build-libffi
164+ METADATA_GENERATOR_ARCHS="$(uname -m)" npm run build-metagen
165+ npm run metagen macos
166+ ./scripts/build_nativescript.sh --no-iphone --no-simulator --no-macos --macos-cli --${ENGINE}
167+ cp ./dist/nsr "${RUNNER_TEMP}/nsr-baseline-${ENGINE}"
168+ cp "./metadata-generator/metadata/metadata.macos.$(uname -m).nsmd" "${RUNNER_TEMP}/metadata-baseline-${ENGINE}.nsmd"
169+ git checkout --detach "${CANDIDATE_SHA}"
170+ git submodule update --init --recursive
171+
172+ - name : Compare Objective-C dispatch performance
173+ run : |
174+ npm run benchmark:objc-dispatch:cli:compare -- \
175+ --engine "${ENGINE}" \
176+ --baseline-binary "${RUNNER_TEMP}/nsr-baseline-${ENGINE}" \
177+ --baseline-metadata "${RUNNER_TEMP}/metadata-baseline-${ENGINE}.nsmd" \
178+ --candidate-binary "${RUNNER_TEMP}/nsr-candidate-${ENGINE}" \
179+ --candidate-metadata "${RUNNER_TEMP}/metadata-candidate-${ENGINE}.nsmd" \
180+ --output "./build/benchmarks/objc-dispatch-${ENGINE}.json"
0 commit comments