Skip to content

Commit

Permalink
Fix: Native SSR Sample (#64)
Browse files Browse the repository at this point in the history
![Ready for
review](https://badgen.net/badge/Status/Ready%20for%20review/green)
[<img width="16" alt="Powered by Pull Request Badge"
src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=elide-dev&utm_campaign=badge_info)<!--
PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->

This changeset applies a fix to the React SSR sample for an error where
`kotlin.random.Random` is missing.

### Changelog

- [x] Link to `stdlib` and `stdlib-jdk8` explicitly in app module
- [x] Make sure `kotlin.random.Random` can be resolved via reflection
  • Loading branch information
sgammon authored Nov 18, 2022
2 parents 5d7390c + 579d26c commit d0eadf0
Show file tree
Hide file tree
Showing 10 changed files with 907 additions and 40 deletions.
37 changes: 32 additions & 5 deletions .github/workflows/build.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Framework
on:
push:
branches:
- v3
- main
- stable
pull_request:
types: [labeled, opened, reopened, synchronize]
Expand Down Expand Up @@ -152,6 +150,18 @@ jobs:
run: ./gradlew detekt -Pelide.ci=true -PbuildSamples=false -Pversions.java.language=${{ matrix.java }}
continue-on-error: true

## Fix SARIF paths
- name: "Fix: SARIF Paths"
if: ${{ matrix.os == 'ubuntu' && matrix.java == '17' }}
continue-on-error: true
run: |
echo "$(
jq \
--arg github_workspace ${{ github.workspace }} \
'. | ( .runs[].results[].locations[].physicalLocation.artifactLocation.uri |= if test($github_workspace) then .[($github_workspace | length | . + 1):] else . end )' \
${{ github.workspace }}/build/reports/detekt/elide.sarif
)" > ${{ github.workspace }}/build/reports/detekt/elide.sarif
## Upload SARIF to GitHub.
- name: "Report: SARIF"
if: ${{ matrix.os == 'ubuntu' && matrix.java == '17' }}
Expand Down Expand Up @@ -468,8 +478,8 @@ jobs:
docker-native:
name: "Docker: Native"
runs-on: ubuntu-latest
needs: [gradle, dependency-review]
continue-on-error: true
needs: [gradle, dependency-review]
if: |
(
github.ref == 'refs/heads/stable' ||
Expand All @@ -489,8 +499,12 @@ jobs:
fail-fast: false
matrix:
project: ["server:hellocss"]
path: ["server/hellocss"]
image: ["elide-fw/samples/server/hellocss/native"]
include:
- project: "fullstack:react-ssr:server"
path: "fullstack/react-ssr/server"
image: "elide-fw/samples/fullstack/react-ssr/native"

steps:
## Setup: GraalVM
Expand Down Expand Up @@ -533,6 +547,7 @@ jobs:
with:
version: 389.0.0
project_id: elide-fw
install_components: "beta"

## Setup: Docker Auth (GAR)
- name: "Authorize Docker: GCP"
Expand All @@ -549,7 +564,7 @@ jobs:

## -- Samples -- ##

## Docker Samples: Server - Hello World - Native
## Docker Samples: Build
- name: "Build/Push: '${{ matrix.project }}' (Native)"
uses: gradle/gradle-build-action@v2.3.3
continue-on-error: true
Expand All @@ -562,6 +577,18 @@ jobs:
:samples:${{ matrix.project }}:optimizedDockerBuildNative
:samples:${{ matrix.project }}:optimizedDockerPushNative
## Docker Samples: Build Fallback
- name: "Build/Push: Fallback to GCB"
if: failure()
run: |
mv ./samples/${{ matrix.path }}/build/docker/native-optimized/DockerfileNative ./samples/${{ matrix.path }}/build/docker/native-optimized/Dockerfile
gcloud beta builds submit \
--machine-type e2-highcpu-32 \
--timeout=2h \
--project elide-fw \
--tag=us-docker.pkg.dev/${{ matrix.image }}:opt-latest \
./samples/${{ matrix.path }}/build/docker/native-optimized
##
## Deploy: Samples
##
Expand All @@ -582,7 +609,7 @@ jobs:
matrix:
category: [fullstack]
app: [react-ssr]
variant: [jvm]
variant: [native]

permissions:
contents: "read"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/labeler.ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Bot: Pull Request Labeler"
on:
- pull_request_target
pull_request:
types: [opened, reopened]

jobs:
triage:
Expand Down
Loading

0 comments on commit d0eadf0

Please sign in to comment.