Skip to content

Thread attach rework #4

Thread attach rework

Thread attach rework #4

Workflow file for this run

name: Build and test pullrequest
on:
pull_request:
branches: [ master ]
permissions:
contents: read
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
jobs:
test-macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build macOS natives
run: |
# See https://github.com/actions/virtual-environments/issues/2557
sudo mv /Library/Developer/CommandLineTools/SDKs/* /tmp
sudo mv /Applications/Xcode.app /Applications/Xcode.app.bak
sudo mv /Applications/Xcode_15.4.0.app /Applications/Xcode.app
sudo xcode-select -switch /Applications/Xcode.app
/usr/bin/xcodebuild -version
./gradlew build_macos
./gradlew jniGen jnigenBuildAllMacOsX
- name: Run test on macos
run: |
./gradlew test
test-linux:
runs-on: ubuntu-20.04
container:
image: ubuntu:18.04
steps:
- name: Install dependencies into minimal dockerfile
run: |
# ubuntu dockerfile is very minimal (only 122 packages are installed)
# need to install updated git (from official git ppa)
apt update
apt install -y software-properties-common
add-apt-repository ppa:git-core/ppa -y
# install dependencies expected by other steps
apt update
apt install -y git \
curl \
ca-certificates \
wget \
bzip2 \
zip \
unzip \
xz-utils \
maven \
ant sudo locales make texinfo
# set Locale to en_US.UTF-8 (avoids hang during compilation)
locale-gen en_US.UTF-8
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
echo "LANGUAGE=en_US.UTF-8" >> $GITHUB_ENV
echo "LC_ALL=en_US.UTF-8" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Install cross-compilation toolchains
run: |
sudo apt update
sudo apt install -y --force-yes gcc g++
sudo apt install -y --force-yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross
sudo apt install -y --force-yes gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-dev-armhf-cross
sudo apt install -y --force-yes gcc-riscv64-linux-gnu g++-riscv64-linux-gnu libc6-dev-riscv64-cross
- name: Build Linux natives
run: |
./gradlew build_linux
./gradlew jnigen jnigenBuildAllLinux
- name: Run test on linux
run: |
./gradlew test
natives-windows:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Install cross-compilation toolchains
run: |
sudo apt update
sudo apt install -y --force-yes mingw-w64 lib32z1
- name: Build Windows natives
run: |
./gradlew build_windows
./gradlew jnigen jnigenBuildAllWindows
- name: Pack artifacts
run: |
find . -name "*.a" -o -name "*.dll" -o -name "*.dylib" -o -name "*.so" | grep "libs" > native-files-list
zip natives-windows -@ < native-files-list
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: natives-windows.zip
path: natives-windows.zip
test-windows:
runs-on: windows-latest
needs: [natives-windows]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Download natives-windows artifact
uses: actions/download-artifact@v3
with:
name: natives-windows.zip
- name: Run windows tests
run: |
./gradlew test