-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: release version autoincrement #983
Changes from 14 commits
f3b2aac
8b9a16b
662ccef
fc5a89a
3d2d7d4
e0cc99f
0477493
d2cbc83
80070ef
2ae3753
ee27cb9
3db33f5
442a8c3
2775ece
1ae5547
368a315
a37d65b
8514e4c
0a07bfc
89738fc
b232f53
d35c735
2a7507f
99ce34d
e32c177
2716c31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
name: Release SQL shared library | ||
on: | ||
push: | ||
branches: ["main"] | ||
branches: ["main", "sql-release-autoincrement"] | ||
paths: | ||
- ".github/workflows/sql-release.yml" | ||
- "sql/**" | ||
- ".github/workflows/sql-test.yml" | ||
|
||
jobs: | ||
librillsql: | ||
|
@@ -17,21 +18,26 @@ jobs: | |
- os: linux | ||
arch: amd64 | ||
runner: ubuntu-latest | ||
- os: windows | ||
arch: amd64 | ||
runner: windows-latest | ||
# - os: windows | ||
# arch: amd64 | ||
# runner: windows-latest | ||
runs-on: ${{ matrix.runner }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Increment patch version | ||
run: | | ||
cd sql | ||
mvn --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn validate -Pbump-patch | ||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: "22.1.0" | ||
java-version: "17" | ||
components: "native-image" | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Install Protoc | ||
# uses: arduino/setup-protoc@v1 | ||
# with: | ||
# repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
# version: '21.5' | ||
- name: Authenticate GCS | ||
uses: google-github-actions/auth@v0 | ||
with: | ||
|
@@ -46,7 +52,17 @@ jobs: | |
shell: bash | ||
run: | | ||
cd sql | ||
mvn package -Pnative-lib | ||
case "$OSTYPE" in | ||
darwin*) PROTOC_ZIP=protoc-21.5-osx-x86_64.zip ;; | ||
linux*) PROTOC_ZIP=protoc-21.5-linux-x86_64.zip ;; | ||
msys*) PROTOC_ZIP=protoc-21.5-win64.zip ;; | ||
esac | ||
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.5/$PROTOC_ZIP | ||
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc | ||
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*' | ||
rm -f $PROTOC_ZIP | ||
mvn --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn test | ||
mvn --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn package -Pnative-lib | ||
- name: Install zip on Windows | ||
if: matrix.os == 'windows' | ||
shell: bash | ||
|
@@ -56,6 +72,12 @@ jobs: | |
run: | | ||
rm sql/target/*.txt | ||
zip -j librillsql-${{ matrix.os }}-${{ matrix.arch }}.zip sql/target/librillsql.* sql/target/graal_isolate.* | ||
- name: Push version changes | ||
uses: EndBug/add-and-commit@v7 | ||
with: | ||
default_author: github_actions | ||
add: sql/pom.xml | ||
message: librillsql release v${{ steps.maven-version.outputs.version }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is going to cause a push directly to
Any other ideas? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it's more dangerous than committing manually. But as a second option I can propose manual version change by PR committer. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've changed it to autoincrement in a PR branch. |
||
- name: Upload archive | ||
uses: google-github-actions/upload-cloud-storage@v0 | ||
with: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.rilldata</groupId> | ||
<artifactId>sql</artifactId> | ||
<version>0.1.0-SNAPSHOT</version> | ||
<version>0.1.1</version> | ||
<properties> | ||
<compiler-plugin.version>3.8.1</compiler-plugin.version> | ||
<failsafe.useModulePath>false</failsafe.useModulePath> | ||
|
@@ -119,8 +119,10 @@ | |
<version>${compiler-plugin.version}</version> | ||
<configuration> | ||
<compilerArgs> | ||
<arg>-parameters</arg> | ||
<arg>-parameters --enable-preview</arg> | ||
</compilerArgs> | ||
<source>17</source> | ||
<target>17</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
|
@@ -286,6 +288,12 @@ | |
</sources> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>parse-version</id> | ||
<goals> | ||
<goal>parse-version</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<!-- Custom parser generation done --> | ||
|
@@ -333,6 +341,34 @@ | |
</plugins> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>bump-patch</id> | ||
<activation> | ||
<property> | ||
<name>bumpPatch</name> | ||
</property> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>versions-maven-plugin</artifactId> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: empty newline There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>set</goal> | ||
</goals> | ||
<phase>validate</phase> | ||
<configuration> | ||
<newVersion>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.nextIncrementalVersion}</newVersion> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<profile> | ||
<id>native-lib</id> | ||
<build> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why this installation option doesn't work? It seems to be widely used. We may also need protoc on the golang side soon, so would be nice to understand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arduino/setup-protoc#33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we using any cutting-edge features or could we just downgrade to the highest version it supports until this issue is resolved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pjain1 , I wonder if need that specific version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just started with the latest stable and it was supported on Java side. For the test I installed protoc manually using the installation instructions given here.