From 85195196980d20681e4286ec51d093b4caad0505 Mon Sep 17 00:00:00 2001 From: Jeff Ward Date: Sat, 23 Sep 2023 16:44:55 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=A9=E2=80=8D=F0=9F=92=BB=20Move=20buil?= =?UTF-8?q?d=20steps=20to=20shared=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also upload artifacts, add Linux target. --- .github/actions/build-action/action.yaml | 13 ++++++++++++ .github/workflows/build.yaml | 25 +++++++++++++++--------- .vscode/settings.json | 5 ++++- 3 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 .github/actions/build-action/action.yaml diff --git a/.github/actions/build-action/action.yaml b/.github/actions/build-action/action.yaml new file mode 100644 index 0000000..e80deeb --- /dev/null +++ b/.github/actions/build-action/action.yaml @@ -0,0 +1,13 @@ +name: Build Dart Shared Library +runs: + using: "composite" + steps: + - uses: dart-lang/setup-dart@v1 + - uses: ilammy/msvc-dev-cmd@v1 + - run: dart pub get + working-directory: ./scripts/build_helpers + - name: Build Dart + run: dart ./scripts/build_helpers/bin/build_dart.dart + - uses: threeal/cmake-action@v1.3.0 + - name: Build Shared Library + run: cmake --build build --config release diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8118e0d..1856a49 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,12 +11,19 @@ jobs: DEPOT_TOOLS_WIN_TOOLCHAIN: 0 steps: - uses: actions/checkout@v3 - - uses: dart-lang/setup-dart@v1 - - uses: ilammy/msvc-dev-cmd@v1 - - run: dart pub get - working-directory: ./scripts/build_helpers - - name: Build Dart - run: dart ./scripts/build_helpers/bin/build_dart.dart - - uses: threeal/cmake-action@v1.3.0 - - name: Build Shared Library - run: cmake --build build --config release + - uses: ./.github/actions/build-action + - name: 'Upload Artifact' + uses: actions/upload-artifact@v3 + with: + name: windows-libs + path: ./build/src/Release/ + build_linux: + runs-on: [ubuntu-latest] + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/build-action + - name: 'Upload Artifact' + uses: actions/upload-artifact@v3 + with: + name: linux-libs + path: ./build/src/Release/ diff --git a/.vscode/settings.json b/.vscode/settings.json index 9dc4e40..19903bf 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,8 @@ "**/.DS_Store": true, // this is a default value "dart-sdk/": true - } + }, + "dart.analysisExcludedFolders": [ + "dart-sdk" + ] } \ No newline at end of file