-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2182 from posit-dev/feature/linux-releases
Build .deb and .rpm packages for Linux
- Loading branch information
Showing
8 changed files
with
172 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: "Positron: Build Linux Releases" | ||
|
||
|
||
# Callable workflow that builds Positron for Linux | ||
# Note: our releases are now multi-platform, coordinated by build-release.yml | ||
on: | ||
workflow_call: | ||
inputs: | ||
build_number: | ||
required: false | ||
description: "The build distance number only, e.g. 123" | ||
default: "999" | ||
type: string | ||
short_version: | ||
required: true | ||
description: "The short version number, including the build distance, e.g. 2023.12.0-123" | ||
default: "2099.12.0-999" | ||
type: string | ||
workflow_dispatch: | ||
|
||
# Ideally we'd have the `vscode-linux-prepare-` and | ||
# `vscode-linux-build-` steps in different jobs, but the | ||
# upload-artifact action to send the Positron build to these jobs fails | ||
# because of https://github.com/actions/upload-artifact/issues/485 | ||
|
||
jobs: | ||
build-binaries: | ||
name: Build Linux binaries | ||
runs-on: ubuntu-latest-8x | ||
timeout-minutes: 120 | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
POSITRON_BUILD_NUMBER: ${{ inputs.build_number }} | ||
|
||
strategy: | ||
max-parallel: 1 | ||
matrix: | ||
arch: [x64] | ||
|
||
steps: | ||
# Checkout sources | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Build Environment | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y vim curl build-essential clang make cmake git python3-pip python-is-python3 libsodium-dev libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1 libnss3 libnspr4 libasound2 libkrb5-dev | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Execute yarn | ||
env: | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | ||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1 | ||
POSITRON_GITHUB_PAT: ${{ secrets.POSITRON_GITHUB_PAT }} | ||
run: | | ||
# Install Yarn | ||
npm install -g yarn | ||
# Install node-gyp; this is required by some packages, and yarn | ||
# sometimes fails to automatically install it. | ||
yarn global add node-gyp | ||
# Perform the main yarn command; this installs all Node packages and | ||
# dependencies | ||
yarn --immutable --network-timeout 120000 | ||
- name: Build Positron | ||
run: | | ||
yarn gulp vscode-linux-${{ matrix.arch }} | ||
- name: Prepare binary | ||
run: | | ||
yarn gulp vscode-linux-${{ matrix.arch }}-prepare-deb | ||
yarn gulp vscode-linux-${{ matrix.arch }}-prepare-rpm | ||
# There is only .deb or .rpm file generated by the gulp "build" | ||
# step. The `*` globs in the `mv` command will match a single | ||
# file and are just a convenient way of matching the generated | ||
# filename. | ||
- name: Build binary | ||
run: | | ||
yarn gulp vscode-linux-${{ matrix.arch }}-build-deb | ||
yarn gulp vscode-linux-${{ matrix.arch }}-build-rpm | ||
mv .build/linux/deb/*/deb/*.deb Positron-${{ inputs.short_version }}.deb | ||
mv .build/linux/rpm/*/*.rpm Positron-${{ inputs.short_version }}.rpm | ||
- name: Upload .rpm | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: positron-binary-rpm | ||
path: Positron-${{ inputs.short_version }}.rpm | ||
|
||
- name: Upload .deb | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: positron-binary-deb | ||
path: Positron-${{ inputs.short_version }}.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters