Skip to content

Build native doesn't cross-compile #48

Build native doesn't cross-compile

Build native doesn't cross-compile #48

Workflow file for this run

name: Build Native
on:
pull_request:
push:
tags:
- '@appland/appmap-v*'
jobs:
linux:
runs-on: ubuntu-latest
if:
${{ contains(github.event.pull_request.labels.*.name, 'build native') ||
startsWith(github.ref, 'refs/tags/@appland/appmap-v') }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: ./.github/actions/setup-node
- name: Build
run: |
yarn build
cd packages/cli
yarn build-native linux x64
${GITHUB_WORKSPACE}/bin/hash release/appmap-linux-x64
- name: Publish appmap-linux-x64 artifact
uses: actions/upload-artifact@v4
with:
name: appmap-linux-x64
path: packages/cli/release/appmap-linux-x64
- name: 'Release: appmap-linux-x64'
uses: svenstaro/upload-release-action@v2
if: github.ref_type == 'tag'
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: packages/cli/release/appmap-linux-x64
asset_name: appmap-linux-x64
tag: ${{ github.ref }}
overwrite: true
- name: 'Release: appmap-linux-x64.sha256'
uses: svenstaro/upload-release-action@v2
if: github.ref_type == 'tag'
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: packages/cli/release/appmap-linux-x64.sha256
asset_name: appmap-linux-x64.sha256
tag: ${{ github.ref }}
overwrite: true
macos-x64:
runs-on: macos-12
if:
${{ contains(github.event.pull_request.labels.*.name, 'build native') ||
startsWith(github.ref, 'refs/tags/@appland/appmap-v') }}
env:
PUPPETEER_SKIP_DOWNLOAD: 1
APPLE_IDENTITY_PRIVATE_KEY: ${{ secrets.APPLE_IDENTITY_PRIVATE_KEY }}
APPLE_IDENTITY_CERTIFICATE: ${{ secrets.APPLE_IDENTITY_CERTIFICATE }}
APPLE_CONNECT_KEY_B64: ${{ secrets.APPLE_CONNECT_KEY_B64 }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install deps
run: |
python3 -m pip install --break-system-packages setuptools
- name: Setup Node
uses: ./.github/actions/setup-node
- name: Build
run: |
yarn build
cd packages/cli
yarn build-native macos x64
${GITHUB_WORKSPACE}/bin/presign
${GITHUB_WORKSPACE}/bin/sign release/appmap-macos-x64
${GITHUB_WORKSPACE}/bin/notarize release/appmap-macos-x64
${GITHUB_WORKSPACE}/bin/hash release/appmap-macos-x64
- name: Publish appmap-macos-x64
uses: actions/upload-artifact@v4
with:
name: appmap-macos-x64
path: packages/cli/release/appmap-macos-x64
- name: 'Release: appmap-macos-x64'
uses: svenstaro/upload-release-action@v2
if: github.ref_type == 'tag'
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: packages/cli/release/appmap-macos-x64
asset_name: appmap-macos-x64
tag: ${{ github.ref }}
overwrite: true
- name: 'Release: appmap-macos-x64.sha256'
uses: svenstaro/upload-release-action@v2
if: github.ref_type == 'tag'
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: packages/cli/release/appmap-macos-x64.sha256
asset_name: appmap-macos-x64.sha256
tag: ${{ github.ref }}
overwrite: true
macos-arm:
runs-on: macos-14
if:
${{ contains(github.event.pull_request.labels.*.name, 'build native') ||
startsWith(github.ref, 'refs/tags/@appland/appmap-v') }}
env:
PUPPETEER_SKIP_DOWNLOAD: 1
APPLE_IDENTITY_PRIVATE_KEY: ${{ secrets.APPLE_IDENTITY_PRIVATE_KEY }}
APPLE_IDENTITY_CERTIFICATE: ${{ secrets.APPLE_IDENTITY_CERTIFICATE }}
APPLE_CONNECT_KEY_B64: ${{ secrets.APPLE_CONNECT_KEY_B64 }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install deps
run: |
python3 -m pip install --break-system-packages setuptools
- name: Setup Node
uses: ./.github/actions/setup-node
- name: Restore cargo cache
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-${{ runner.arch }}-cargo
- name: Build
run: |
yarn build
cd packages/cli
yarn build-native macos arm64
${GITHUB_WORKSPACE}/bin/presign
${GITHUB_WORKSPACE}/bin/sign release/appmap-macos-arm64
${GITHUB_WORKSPACE}/bin/notarize release/appmap-macos-arm64
${GITHUB_WORKSPACE}/bin/hash release/appmap-macos-arm64
- name: Publish appmap-macos-arm64
uses: actions/upload-artifact@v4
with:
name: appmap-macos-arm64
path: packages/cli/release/appmap-macos-arm64
- name: 'Release: appmap-macos-arm64'
uses: svenstaro/upload-release-action@v2
if: github.ref_type == 'tag'
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: packages/cli/release/appmap-macos-arm64
asset_name: appmap-macos-arm64
tag: ${{ github.ref }}
overwrite: true
- name: 'Release: appmap-macos-arm64.sha256'
uses: svenstaro/upload-release-action@v2
if: github.ref_type == 'tag'
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: packages/cli/release/appmap-macos-arm64.sha256
asset_name: appmap-macos-arm64.sha256
tag: ${{ github.ref }}
overwrite: true
windows:
runs-on: windows-latest
if:
${{ contains(github.event.pull_request.labels.*.name, 'build native') ||
startsWith(github.ref, 'refs/tags/@appland/appmap-v') }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: ./.github/actions/setup-node
- name: Restore cargo cache
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-${{ runner.arch }}-cargo
- name: Build
shell: bash
run: |
choco install rsync
yarn build
cd packages/cli
yarn build-native windows x64
${GITHUB_WORKSPACE}/bin/hash release/appmap-win32-x64.exe
- name: Publish appmap-windows-x64
uses: actions/upload-artifact@v4
with:
name: appmap-windows-x64
path: packages/cli/release/appmap-windows-x64.exe
- name: 'Release: appmap-windows-x64.exe'
uses: svenstaro/upload-release-action@v2
if: github.ref_type == 'tag'
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: packages/cli/release/appmap-windows-x64.exe
asset_name: appmap-windows-x64.exe
tag: ${{ github.ref }}
overwrite: true
- name: 'Release: appmap-windows-x64.exe.sha256'
uses: svenstaro/upload-release-action@v2
if: github.ref_type == 'tag'
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: packages/cli/release/appmap-windows-x64.exe.sha256
asset_name: appmap-windows-x64.exe.sha256
tag: ${{ github.ref }}
overwrite: true
finalize-release:
name: finalize release
if: ${{ startsWith(github.ref, 'refs/tags/@appland/appmap-v') }}
runs-on: ubuntu-latest
needs:
- linux
- macos-x64
- macos-arm
- windows
steps:
- name: Checkout
uses: actions/checkout@v3
- run: yarn npm tag add ${{ github.ref_name }} latest