Skip to content

Commit

Permalink
Merge branch 'canary' into orchestration_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
anish-palakurthi committed Jul 25, 2024
2 parents 5fae29a + 7cd8794 commit 2dead0d
Show file tree
Hide file tree
Showing 124 changed files with 6,184 additions and 2,055 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build-python-release.reusable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Release language_client_python

on:
workflow_call: {}

concurrency:
# suffix is important to prevent a concurrency deadlock with the calling workflow
group: ${{ github.workflow }}-${{ github.ref }}-build-python
cancel-in-progress: true

jobs:
build:
strategy:
fail-fast: false
matrix:
_:
- runs_on: ubuntu-latest
target: x86_64
name: x86_64-unknown-linux-gnu
manylinux: 'auto'

- runs_on: ubuntu-latest
target: aarch64
name: aarch64-unknown-linux-gnu
manylinux: '2_28'

- runs_on: macos-latest
target: x86_64
name: x86_64-apple-darwin

- runs_on: macos-latest
target: aarch64
name: aarch64-apple-darwin

- runs_on: windows-latest
target: x64
name: x86_64-pc-windows-msvc

runs-on: ${{ matrix._.runs_on }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
architecture: ${{ matrix._.runs_on == 'windows-latest' && 'x64' || null }}

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix._.target }}
command: build
args: --release --out engine/language_client_python/dist --manifest-path engine/language_client_python/Cargo.toml
sccache: "true"
manylinux: ${{ matrix._.manylinux }}
before-script-linux: |
if command -v yum &> /dev/null; then
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
else
# If we're running on debian-based system.
apt update -y && apt-get install -y libssl-dev openssl pkg-config
fi
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix._.name }}
path: engine/language_client_python/dist
if-no-files-found: error
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
name: Release engine/language_client_ruby

on:
workflow_dispatch: {}
workflow_call: {}

permissions:
contents: read
id-token: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# suffix is important to prevent a concurrency deadlock with the calling workflow
group: ${{ github.workflow }}-${{ github.ref }}-build-ruby
cancel-in-progress: true

jobs:
build:
strategy:
fail-fast: false
matrix:
platform:
- x86_64-linux
- aarch64-linux
- x86_64-darwin
- arm64-darwin
_:
- platform: x86_64-linux
# This is necessary because rb-sys-dock depends on manylinux2014,
# which is based on CentOS 7 which is EOL as of July 2024 Once
# rake-compiler-dock switches to manylinux_2_28 and rb-sys-dock
# picks that up, we can pick their updates up and then drop this.
# See https://github.com/oxidize-rb/rb-sys/issues/402 and
# https://github.com/rake-compiler/rake-compiler-dock/issues/122
# for more details.
rb-sys-dock-setup: ./x86-64_linux-setup.sh
- platform: aarch64-linux
- platform: x86_64-darwin
- platform: arm64-darwin
#- x64-mingw-ucrt

runs-on: ubuntu-latest
defaults:
run:
working-directory: engine/language_client_ruby
steps:
- uses: rubygems/configure-rubygems-credentials@main
with:
# https://rubygems.org/profile/oidc/api_key_roles/rg_oidc_akr_p6x4xz53qtk948na3bgy
role-to-assume: rg_oidc_akr_p6x4xz53qtk948na3bgy

- uses: actions/checkout@v4

- uses: oxidize-rb/actions/setup-ruby-and-rust@main
Expand Down Expand Up @@ -65,34 +69,6 @@ jobs:
echo "RB_SYS_DOCK_CACHE_DIR=$rb_sys_dock_cache_dir" >> $GITHUB_ENV
echo "rb_sys_version=$rb_sys_version" >> $GITHUB_OUTPUT
#- name: Setup caching
# uses: actions/cache@v4
# with:
# path: |
# ${{ env.RB_SYS_DOCK_CACHE_DIR }}
# tmp/rb-sys-dock/${{ inputs.platform }}/target
# key: rb-sys-dock-${{ inputs.cache-version }}-${{ inputs.platform }}-${{ hashFiles('**/Gemfile.lock', '**/Cargo.lock') }}
# save-always: ${{ inputs.cache-save-always == 'true' }}
# restore-keys: |
# rb-sys-dock-${{ inputs.cache-version }}-${{ inputs.platform }}-

#- name: Install cargo-cache
# uses: oxidize-rb/actions/cargo-binstall@v1
# id: install-cargo-cache
# if: inputs.cargo-cache-clean == 'true'
# with:
# crate: cargo-cache
# version: 0.8.3
# strategies: quick-install

#- name: Clean the cargo cache
# if: inputs.cargo-cache-clean == 'true'
# uses: oxidize-rb/actions/post-run@v1
# with:
# run: cargo-cache --autoclean
# cwd: ${{ inputs.working-directory }}
# always: ${{ inputs.cache-save-always == 'true' }}

- name: Setup rb-sys
shell: bash
run: |
Expand All @@ -108,35 +84,24 @@ jobs:
- name: Build gem
shell: bash
working-directory: engine
if: ${{ matrix.platform == 'x86_64-linux' }}
run: |
: Compile gem
echo "Docker Working Directory: $(pwd)"
set -x
# Unfortunately we can't actually parallelize the Ruby versions
# because they get bundled into the same gem
rb-sys-dock \
--platform ${{ matrix.platform }} \
--platform ${{ matrix._.platform }} \
--mount-toolchains \
--directory language_client_ruby \
--ruby-versions 3.3,3.2,3.1,3.0,2.7 \
--ruby-versions 3.3,3.2,3.1 \
--build \
-- sudo yum install -y perl-IPC-Cmd
- name: Build gem
-- ${{ matrix._.rb-sys-dock-setup }}
- name: Show built gem
shell: bash
working-directory: engine
if: ${{ matrix.platform != 'x86_64-linux' }}
run: |
: Compile gem
echo "Docker Working Directory: $(pwd)"
set -x
rb-sys-dock \
--platform ${{ matrix.platform }} \
--mount-toolchains \
--directory language_client_ruby \
--ruby-versions 3.3,3.2,3.1,3.0,2.7 \
--build
run: find pkg -name '*.gem'

#################################################################################################################
#
Expand All @@ -147,7 +112,14 @@ jobs:
#
#################################################################################################################

- run: |
for i in $(ls pkg/*.gem); do
gem push $i
done
- name: Upload Ruby artifact
uses: actions/upload-artifact@v4
with:
name: gem-${{ matrix._.platform }}
path: engine/language_client_ruby/pkg/*.gem
if-no-files-found: error

# - run: |
# for i in $(ls pkg/*.gem); do
# gem push $i
# done
6 changes: 2 additions & 4 deletions .github/workflows/primary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9.0.6
run_install: false
- uses: jdx/mise-action@v2
- uses: actions/setup-node@v4
with:
node-version: 20
Expand Down Expand Up @@ -81,6 +78,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
Expand Down
Loading

0 comments on commit 2dead0d

Please sign in to comment.