Skip to content

Commit

Permalink
Merge branch 'master' into win-aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
xerial authored May 25, 2023
2 parents 536b42e + 256691e commit c65e165
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 22 deletions.
49 changes: 28 additions & 21 deletions .github/workflows/build-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,30 @@ name: Build Native

on:
workflow_dispatch:
push:
branches:
- master
- main
paths:
- 'src/main/resources/org/xerial/snappy/VERSION'
- 'Makefile'
- 'Makefile.common'
- '**/*.h'
- '**/*.cpp'
- .github/workflows/build-native.yml
pull_request:
paths:
- 'src/main/resources/org/xerial/snappy/VERSION'
- 'Makefile'
- 'Makefile.common'
- '**/*.h'
- '**/*.cpp'

jobs:
build:
permissions:
contents: write
pull-requests: write
name: Build native libraries
runs-on: ubuntu-latest
steps:
Expand All @@ -13,25 +34,11 @@ jobs:
run: make clean-native native-all
env:
OCI_EXE: docker
- name: Upload native libraries
uses: actions/upload-artifact@v3
with:
name: native-libs
path: src/main/resources/org/xerial/snappy/native/
push:
name: Push new native libraries to branch
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v3
- name: Download native libraries
uses: actions/download-artifact@v3
with:
name: native-libs
path: src/main/resources/org/xerial/snappy/native/
- run: git status
- name: Commit and push
uses: EndBug/add-and-commit@v9
- name: Create Pull Request
if: ${{ github.event_name != 'pull_request' }}
uses: peter-evans/create-pull-request@v5
with:
message: 'Update native libraries'
default_author: github_actions
title: Update native libraries
commit-message: Update native libraries for ${{ github.sha }}
branch: update-native-libs
labels: library-update
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ on:
- '**.java'
- '**.sbt'
- '.github/workflows/*.yml'
- '**.so'
- '**.dll'
- 'src/main/resources/**'
push:
branches:
- master
- main
paths:
- '**.scala'
- '**.java'
- '**.sbt'
- '.github/workflows/*.yml'
- 'src/main/resources/org/xerial/snappy/**'

jobs:
code_format:
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ win-armv7: jni-header
win-aarch64: jni-header
./docker/dockcross-windows-arm64 -a $(DOCKER_RUN_OPTS) bash -c 'make clean-native native OS_NAME=Windows OS_ARCH=aarch64'


# TODO: CROSS_PREFIX can be replaced with ${CROSS_ROOT}/bin/${CROSS_TRIPLE}- in Makefile.common
linux-arm: jni-header
./docker/dockcross-armv5 -a $(DOCKER_RUN_OPTS) bash -c 'make clean-native native CROSS_PREFIX=/usr/xcc/armv5-unknown-linux-gnueabi/bin//armv5-unknown-linux-gnueabi- OS_NAME=Linux OS_ARCH=arm'

Expand Down
2 changes: 1 addition & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ endif

# os=Default is meant to be generic unix/linux

# To support new CPU architecture, add a new target name here
known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armv6 Linux-armv7 Linux-android-arm Linux-android-aarch64 Linux-aarch64 Linux-ppc Linux-ppc64 Linux-ppc64le Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 Mac-aarch64 FreeBSD-x86_64 Windows-x86 Windows-x86_64 Windows-armv7 Windows-aarch64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64 Linux-riscv Linux-riscv64

os_arch := $(OS_NAME)-$(OS_ARCH)
IBM_JDK_7 := $(findstring IBM, $(shell $(JAVA) -version 2>&1 | grep IBM | grep "JRE 1.7"))

Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit c65e165

Please sign in to comment.