Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/buildVictoryChartRenderer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build victory-chart-renderer

on:
workflow_call:
inputs:
ref:
description: Git ref to checkout and build
type: string
required: true
release-tag:
description: GitHub Release tag for this deploy (used in failure notifications)
type: string
required: true

outputs:
BINARY_FILENAME:
description: Filename of the compiled Linux x64 binary
value: ${{ jobs.build.outputs.BINARY_FILENAME }}

jobs:
build:
name: Build victory-chart-renderer (Linux x64)
runs-on: blacksmith-8vcpu-ubuntu-2404
outputs:
BINARY_FILENAME: victory-chart-renderer-linux-x64
steps:
- name: Checkout
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
with:
ref: ${{ inputs.ref }}

- name: Setup Node
uses: ./.github/actions/composite/setupNode

- name: Setup Bun
# v2.0.2
uses: oven-sh/setup-bun@81fe9a935c4d9aed6ff8654c7e6e27f3df8dc3ae
with:
bun-version-file: .bun-version

- name: Build victory-chart-renderer Linux x64 binary
run: npm run server:vcr:build:linux

- name: Verify compiled binary is executable
run: test -x server/victory-chart-renderer/dist/victory-chart-renderer-linux-x64

- name: Upload victory-chart-renderer Linux x64 artifact
# v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
with:
name: victory-chart-renderer-linux-x64-artifact
path: server/victory-chart-renderer/dist/victory-chart-renderer-linux-x64

- name: Log victory-chart-renderer build failure
if: failure() || cancelled()
run: |
echo "::error::victory-chart-renderer Linux x64 build did not succeed for release ${{ inputs.release-tag }}. GitHub Release will not include victory-chart-renderer-linux-x64."

- name: Announce victory-chart-renderer build failure in Slack
if: failure() || cancelled()
# v3
uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e
with:
status: custom
custom_payload: |
{
channel: '#announce',
attachments: [{
color: 'warning',
text: `⚠️ ${process.env.AS_REPO} <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|victory-chart-renderer build> failed for deploy release <https://github.com/Expensify/App/releases/tag/${{ inputs.release-tag }}|${{ inputs.release-tag }}>. victory-chart-renderer-linux-x64 will not be attached.`,
}]
}
env:
GITHUB_TOKEN: ${{ github.token }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
20 changes: 19 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,15 @@ jobs:
environment: ${{ needs.prep.outputs.DEPLOY_ENV }}
secrets: inherit

victoryChartRendererBuild:
name: Build victory-chart-renderer (Linux x64)
needs: [prep]
uses: ./.github/workflows/buildVictoryChartRenderer.yml
with:
ref: ${{ needs.prep.outputs.DEPLOY_SHA }}
release-tag: ${{ needs.prep.outputs.TAG }}
secrets: inherit
Comment thread
roryabraham marked this conversation as resolved.

webDeploy:
name: Deploy Web to S3
needs: [prep, webBuild, buildStorybook]
Expand Down Expand Up @@ -868,7 +877,7 @@ jobs:
createRelease:
runs-on: blacksmith-2vcpu-ubuntu-2404
if: ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED) }}
needs: [prep, checkDeploymentSuccess]
needs: [prep, checkDeploymentSuccess, victoryChartRendererBuild]
permissions:
contents: write
steps:
Expand Down Expand Up @@ -958,6 +967,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Upload victory-chart-renderer to GitHub Release
if: ${{ needs.victoryChartRendererBuild.result == 'success' }}
run: |
test -x ./victory-chart-renderer-linux-x64-artifact/victory-chart-renderer-linux-x64
gh release upload "${{ needs.prep.outputs.TAG }}" --repo "${{ github.repository }}" --clobber \
"./victory-chart-renderer-linux-x64-artifact/victory-chart-renderer-linux-x64#victory-chart-renderer-linux-x64"
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Warn deployers if deploy failed
if: ${{ failure() }}
# v3
Expand Down
Loading