Skip to content

Commit

Permalink
[BACKPORT 1.3] feat: enable windows and macos builds (#1108) (#1328)
Browse files Browse the repository at this point in the history
* feat: enable windows and macos builds (#1108)

* fix: initial code to add windows support for opensearch-observability

Signed-off-by: Derek Ho <[email protected]>

* add build for windows in dashboards-observability

Signed-off-by: Derek Ho <[email protected]>

* change windows command and add windows build for UI modules

Signed-off-by: Derek Ho <[email protected]>

* try gradlew bat for windows

Signed-off-by: Derek Ho <[email protected]>

* try to exclude tests

Signed-off-by: Derek Ho <[email protected]>

* fix jacoco

Signed-off-by: Derek Ho <[email protected]>

* do for mac and change name

Signed-off-by: Derek Ho <[email protected]>

* try to run the tests for windows and mac

Signed-off-by: Derek Ho <[email protected]>

* try to add gitattributes file

Signed-off-by: Derek Ho <[email protected]>

* add formatting rule

Signed-off-by: Derek Ho <[email protected]>

* try to enable both

Signed-off-by: Derek Ho <[email protected]>

* try to add git config to fix

Signed-off-by: Derek Ho <[email protected]>

* autocrlf false for windwos and remove comments

Signed-off-by: Derek Ho <[email protected]>

* comment out bwc tests,

Signed-off-by: Derek Ho <[email protected]>

* add line

Signed-off-by: Derek Ho <[email protected]>

* fix up using matrix and fix test

Signed-off-by: Derek Ho <[email protected]>

Signed-off-by: Derek Ho <[email protected]>
(cherry picked from commit 363ccd4)
Signed-off-by: Derek Ho <[email protected]>

* remove java 17

Signed-off-by: Derek Ho <[email protected]>

* remove -d for windows

Signed-off-by: Derek Ho <[email protected]>

* Update .github/workflows/dashboards-observability-test-and-build-workflow.yml

Signed-off-by: Derek Ho <[email protected]>

* fix fail fast

Signed-off-by: Derek Ho <[email protected]>

* try to do fix step for mac

Signed-off-by: Derek Ho <[email protected]>

* remove mac

Signed-off-by: Derek Ho <[email protected]>

Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho authored Dec 6, 2022
1 parent b56ff10 commit 33d7f35
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ env:
jobs:

build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout Plugin
Expand Down Expand Up @@ -57,13 +60,13 @@ jobs:
yarn test --coverage
- name: Upload coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v1
with:
flags: dashboards-observability
directory: ./OpenSearch-Dashboards/plugins/dashboards-observability
token: ${{ secrets.CODECOV_TOKEN }}

# TODO remove hard coded version when observability is ready
- name: Build Artifact
run: |
cd OpenSearch-Dashboards/plugins/dashboards-observability
Expand All @@ -73,6 +76,5 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: dashboards-observability
path: ./OpenSearch-Dashboards/plugins/dashboards-observability/build

name: dashboards-observability-${{ matrix.os }}
path: ./OpenSearch-Dashboards/plugins/dashboards-observability/build
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ env:

jobs:
build:
env:
BUILD_ARGS: ${{ matrix.os_build_args }}
strategy:
matrix:
java:
- 8
- 11
- 14

runs-on: ubuntu-latest
java: [8, 11]
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: windows-latest
os_build_args: -x integTest -x jacocoTestReport
- os: macos-latest
os_build_args: -x integTest -x jacocoTestReport
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
Expand All @@ -27,6 +31,8 @@ jobs:
java-version: ${{ matrix.java }}

- name: Run Backwards Compatibility Tests
# Temporarily only do this for linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
cd opensearch-observability
echo "Running backwards compatibility tests ..."
Expand All @@ -35,9 +41,10 @@ jobs:
- name: Build with Gradle
run: |
cd opensearch-observability
./gradlew build -Dopensearch.version=${{ env.OPENSEARCH_VERSION }}
./gradlew build ${{ env.BUILD_ARGS }}
- name: Upload coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v1
with:
flags: opensearch-observability
Expand All @@ -52,5 +59,5 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: opensearch-observability
path: opensearch-observability-builds
name: opensearch-observability-${{ matrix.os }}
path: opensearch-observability-builds
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ export const NoResults = () => {
<p>
<FormattedMessage
id="discover.noResults.queryMayNotMatchTitle"
defaultMessage="Your query may not match anything in the current time range, or there may not be any data at all in
the currently selected time range. Try change time range, query filters or choose different time fields"
defaultMessage="Your query may not match anything in the current time range, or there may not be any data at all in the currently selected time range. Try change time range, query filters or choose different time fields"
/>
</p>
</EuiText>
Expand Down

0 comments on commit 33d7f35

Please sign in to comment.