Skip to content

Commit

Permalink
[BACKPORT 1.x] feat: enable windows and macos builds (#1108) (#1329)
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]>

* fix merge conflict

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 a769433 commit a2eadcb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ env:
jobs:

build:

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

steps:
- name: Checkout Plugin
Expand Down Expand Up @@ -57,13 +59,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 +75,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
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 a2eadcb

Please sign in to comment.