diff options
author | Mukilan Thiyagarajan <mukilan@igalia.com> | 2024-09-20 13:50:27 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-20 08:20:27 +0000 |
commit | 157e28c59b34ec8c7334161fda658cbbb1e66a25 (patch) | |
tree | a4f2b9b57f1c3b30333a97fb3831973c110fad99 /.github | |
parent | 457d37d94ee6966cad377c373d333a00c637e1ae (diff) | |
download | servo-157e28c59b34ec8c7334161fda658cbbb1e66a25.tar.gz servo-157e28c59b34ec8c7334161fda658cbbb1e66a25.zip |
openharmony: add servoshell for ohos (#33295)
* openharmony: add servoshell for ohos
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* ohos: handle missing signing config on forks
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
---------
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/main.yml | 1 | ||||
-rw-r--r-- | .github/workflows/ohos.yml | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 446d4f36ef3..1975a653454 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,6 +57,7 @@ jobs: uses: ./.github/workflows/ohos.yml with: profile: "release" + secrets: inherit build-result: name: Result diff --git a/.github/workflows/ohos.yml b/.github/workflows/ohos.yml index 61400a33c0f..513efc3c84d 100644 --- a/.github/workflows/ohos.yml +++ b/.github/workflows/ohos.yml @@ -55,9 +55,32 @@ jobs: uses: openharmony-rs/setup-ohos-sdk@v0.1 with: version: "4.1" + components: "native;toolchains;ets;js;previewer" + fixup-path: true + - name: Install node for hvigor + uses: actions/setup-node@v4 + with: + node-version: 18 + - name: Install hvigor modules + run: | + mkdir ~/hvigor-installation + cd ~/hvigor-installation + echo "@ohos:registry=https://repo.harmonyos.com/npm/" > .npmrc + npm install "@ohos/hvigor@5" "@ohos/hvigor-ohos-plugin@5" + echo "HVIGOR_PATH=$PWD" >> $GITHUB_ENV + - name: "Setup HAP signing config" + env: + SIGNING_MATERIAL: ${{ secrets.SERVO_OHOS_SIGNING_MATERIAL }} + if: ${{ env.SIGNING_MATERIAL != '' }} # Allows the build to pass on forks. + run: | + cd ~ + echo "${SIGNING_MATERIAL}" | base64 -d > servo-ohos-material.zip + unzip servo-ohos-material.zip + echo "SERVO_OHOS_SIGNING_CONFIG=${PWD}/servo-ohos-material/signing-configs.json" >> $GITHUB_ENV - name: Build (arch ${{ matrix.arch }} profile ${{ inputs.profile }}) env: OHOS_SDK_NATIVE: ${{ steps.setup_sdk.outputs.ohos_sdk_native }} + OHOS_BASE_SDK_HOME: ${{ steps.setup_sdk.outputs.ohos-base-sdk-home }} run: | python3 ./mach build --locked --target ${{ matrix.arch }} --${{ inputs.profile }} cp -r target/cargo-timings target/cargo-timings-ohos-${{ matrix.arch }} @@ -67,3 +90,15 @@ jobs: name: cargo-timings-ohos-${{ matrix.arch }} # Using a wildcard here ensures that the archive includes the path. path: target/cargo-timings-* + - name: Upload signed HAP artifact + if: ${{ env.SERVO_OHOS_SIGNING_CONFIG != '' }} # Build output has different name if not signed. + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.profile }}-binary-ohos-${{ matrix.arch }} + path: target/openharmony/${{ matrix.arch }}/${{ inputs.profile }}/entry/build/default/outputs/default/servoshell-default-signed.hap + - name: Upload unsigned HAP artifact + if: ${{ env.SERVO_OHOS_SIGNING_CONFIG == '' }} # Build output has different name if not signed. + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.profile }}-binary-ohos-${{ matrix.arch }} + path: target/openharmony/${{ matrix.arch }}/${{ inputs.profile }}/entry/build/default/outputs/default/servoshell-default-unsigned.hap |