Skip to content
Open
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
46 changes: 46 additions & 0 deletions .github/workflows/publish_snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Publish Snapshot

on:
push:
branches:
- master

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it’s ok to publish on every commit? Or make this run nightly.

I think the former is ok since this repo doesn’t get too many changes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we publish snapshot only when parquet.thrift has been changed?


jobs:
publish-snapshot:
if: github.repository == 'apache/parquet-format'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need to run zizmor to then this into commit hash


- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17

- name: Install Thrift
run: ./dev/install-thrift.sh

- name: Publish snapshot
env:
ASF_USERNAME: ${{ secrets.NEXUS_USER }}
ASF_PASSWORD: ${{ secrets.NEXUS_PW }}
run: |
echo "<settings><servers><server><id>apache.snapshots.https</id><username>$ASF_USERNAME</username><password>$ASF_PASSWORD</password></server></servers></settings>" > "$RUNNER_TEMP/settings.xml"
mvn --settings "$RUNNER_TEMP/settings.xml" --batch-mode -ntp -DskipTests deploy
10 changes: 1 addition & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,7 @@ jobs:
java-version: ${{ matrix.java }}
distribution: temurin
- name: before_install
run: |
sudo apt-get update -qq
sudo apt-get install -qq protobuf-compiler
sudo apt-get install -qq libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev
wget -qO- https://archive.apache.org/dist/thrift/0.24.0/thrift-0.24.0.tar.gz | tar zxf -
cd thrift-0.24.0/
chmod +x ./configure
./configure --disable-libs
sudo make install
run: ./dev/install-thrift.sh
- name: install
run: |
mvn install --batch-mode -DskipTests=true -Dmaven.javadoc.skip=true -Dsource.skip=true -Djava.version=${{ matrix.java }}
Expand Down
35 changes: 35 additions & 0 deletions dev/install-thrift.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Installs Apache Thrift (and its build dependencies) from source.
# Used by the GitHub Actions workflows to generate the Parquet thrift bindings.

set -euo pipefail

THRIFT_VERSION="${THRIFT_VERSION:-0.24.0}"

sudo apt-get update -qq
sudo apt-get install -qq protobuf-compiler
sudo apt-get install -qq libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev

wget -qO- "https://archive.apache.org/dist/thrift/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}.tar.gz" | tar zxf -
cd "thrift-${THRIFT_VERSION}/"
chmod +x ./configure
./configure --disable-libs
sudo make install
Loading