mirror of
https://github.com/wgh136/flutter_qjs.git
synced 2025-09-27 13:27:24 +00:00
github test
This commit is contained in:
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
name: Test on ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -14,10 +15,12 @@ jobs:
|
|||||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Update submodules
|
||||||
|
run: git submodule update --init --recursive
|
||||||
- name: Flutter action
|
- name: Flutter action
|
||||||
uses: subosito/flutter-action@v1.1.1
|
uses: subosito/flutter-action@v1
|
||||||
with:
|
with:
|
||||||
channel: "stable"
|
channel: "stable"
|
||||||
flutter-version: "1.12.x"
|
flutter-version: "1.22.4"
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- run: flutter test test/flutter_qjs_test.dart
|
- run: flutter test test/flutter_qjs_test.dart
|
@@ -45,9 +45,12 @@ Future testEvaluate(qjs) async {
|
|||||||
void main() async {
|
void main() async {
|
||||||
test('make', () async {
|
test('make', () async {
|
||||||
final utf8Encoding = Encoding.getByName('utf-8');
|
final utf8Encoding = Encoding.getByName('utf-8');
|
||||||
final cmakePath = Platform.isWindows
|
var cmakePath = "cmake";
|
||||||
? "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe"
|
if (Platform.isWindows) {
|
||||||
: "cmake";
|
var vsDir = Directory("C:/Program Files (x86)/Microsoft Visual Studio/");
|
||||||
|
vsDir = (vsDir.listSync().firstWhere((e) => e is Directory) as Directory).listSync().last;
|
||||||
|
cmakePath = vsDir.path + "/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe";
|
||||||
|
}
|
||||||
final buildDir = "./build";
|
final buildDir = "./build";
|
||||||
var result = Process.runSync(
|
var result = Process.runSync(
|
||||||
cmakePath,
|
cmakePath,
|
||||||
|
Reference in New Issue
Block a user