[Java] AeronCluster client does not close itself after whole cluster shutdown #7914
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
workflow_call: | |
workflow_dispatch: | |
repository_dispatch: | |
types: run-commit-tests | |
push: | |
branches: | |
- master | |
- release/** | |
pull_request: | |
types: [opened, synchronize] | |
branches: | |
- master | |
- release/** | |
concurrency: | |
group: ci-${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail' | |
INSTALL_COMPILER_RETRIES: '5' | |
permissions: | |
contents: read | |
jobs: | |
java-build: | |
name: Java ${{ matrix.java }} (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [ '17', '21' ] | |
os: [ 'ubuntu-24.04', 'windows-latest', 'macos-latest' ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION (Linux/MacOS) | |
if: runner.os == 'Linux' || runner.os == 'macOS' | |
run: | | |
java -Xinternalversion | |
echo "BUILD_JAVA_HOME=${JAVA_HOME}" >> $GITHUB_ENV | |
echo "BUILD_JAVA_VERSION=${{ matrix.java }}" >> $GITHUB_ENV | |
- name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
java -Xinternalversion | |
echo "BUILD_JAVA_HOME=$env:JAVA_HOME" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
echo "BUILD_JAVA_VERSION=${{ matrix.java }}" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Setup small temp file system (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo mkdir -p /mnt/tmp_aeron_dir | |
sudo mount -t tmpfs -o size=20M,mode=777 tmpfs /mnt/tmp_aeron_dir | |
- name: Setup small temp file system and localhost name (MacOS) | |
if: runner.os == 'macOS' | |
run: | | |
sudo sed -i bak "s/localhost/localhost $(hostname)/" /etc/hosts | |
dscacheutil -flushcache | |
sudo diskutil eraseDisk APFS tmp_aeron_dir $(hdiutil attach -nomount ram://$((2 * 1024 * 20))) | |
- name: Setup small temp file system (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
$current_size = (Get-PartitionSupportedSize -DiskNumber 1 -PartitionNumber 1) | |
$new_size = ($current_size.SizeMax - 100 * 1024 * 1024) | |
Resize-Partition -DiskNumber 1 -PartitionNumber 1 -Size ($new_size) | |
New-Partition -DiskNumber 1 -Size 30MB -DriveLetter T | Format-Volume -FileSystem NTFS -Confirm:$false | |
mkdir T:/tmp_aeron_dir | |
- name: Build with Gradle | |
run: ./gradlew -x javadoc --console=plain | |
- name: Remove small temp file system (Linux) | |
if: always() && runner.os == 'Linux' | |
run: | | |
sudo umount /mnt/tmp_aeron_dir | |
sudo rm -rf /mnt/tmp_aeron_dir | |
- name: Remove small temp file system (MacOS) | |
if: always() && runner.os == 'macOS' | |
run: sudo diskutil eject tmp_aeron_dir | |
- name: Remove small temp file system (Windows) | |
if: always() && runner.os == 'Windows' | |
run: Remove-Partition -DriveLetter T -Confirm:$false | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-${{ matrix.os }}-java-${{ matrix.java }} | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
java-topology-build: | |
name: Java Topology Tests (JDK ${{ matrix.java }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [ '17' ] | |
os: [ 'ubuntu-24.04' ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION | |
run: | | |
java -Xinternalversion | |
echo "BUILD_JAVA_HOME=${JAVA_HOME}" >> $GITHUB_ENV | |
echo "BUILD_JAVA_VERSION=${{ matrix.java }}" >> $GITHUB_ENV | |
- name: Setup virtual network interfaces | |
run: ./aeron-samples/scripts/cluster/setup-namespaces | |
- name: Build aeron with Gradle | |
run: ./gradlew clean assemble -x javadoc | |
- name: Run execution agents | |
working-directory: ./aeron-samples/scripts/cluster | |
run: ./agent-ns | |
- name: Get network information | |
run: | | |
sudo sysctl -w net.ipv4.ip_forward=1 | |
sudo iptables -F FORWARD | |
sudo iptables -P FORWARD ACCEPT | |
- name: Run topology tests with Gradle | |
run: ./gradlew topologyTest | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-topology-${{ matrix.os }}-java-${{ matrix.java }} | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
cpp-gcc-2004-build: | |
name: C++ GCC ${{ matrix.version }} (Ubuntu 20.04) | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [ '6', '7', '8', '9', '10' ] | |
env: | |
CC: gcc-${{ matrix.version }} | |
CXX: g++-${{ matrix.version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Install compiler | |
run: | | |
echo 'Acquire::Retries "${INSTALL_COMPILER_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries | |
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ bionic main universe" | |
sudo apt-get update | |
sudo apt-get install -y g++-${{ matrix.version }} libbsd-dev uuid-dev libidn11 | |
- name: Build | |
run: cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --cxx-hide-deprecation-message | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-gcc-2004-${{ matrix.version }} | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
cpp-gcc-2404-build: | |
name: C++ GCC ${{ matrix.version }} (Ubuntu 24.04) | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [ '11', '12', '13', '14' ] | |
env: | |
CC: gcc-${{ matrix.version }} | |
CXX: g++-${{ matrix.version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Install compiler | |
run: | | |
echo 'Acquire::Retries "${INSTALL_COMPILER_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install -y g++-${{ matrix.version }} libbsd-dev uuid-dev | |
- name: Setup small temp file system | |
run: | | |
sudo mkdir -p /mnt/tmp_aeron_dir | |
sudo mount -t tmpfs -o size=20M,mode=777 tmpfs /mnt/tmp_aeron_dir | |
- name: Build | |
run: cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --cxx-hide-deprecation-message | |
- name: Remove small temp file system | |
if: always() | |
run: | | |
sudo umount /mnt/tmp_aeron_dir | |
sudo rm -rf /mnt/tmp_aeron_dir | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-gcc-2404-${{ matrix.version }} | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
cpp-gcc-rocky-build: | |
name: C++ Rocky 8 | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [ '10' ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Build | |
run: GCC_VERSION=${{ matrix.version }} cppbuild/rocky-docker-build | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-gcc-rhel-${{ matrix.version }} | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
cpp-clang-ubuntu-2004-build: | |
name: C++ Clang ${{ matrix.version }} (Ubuntu 20.04) | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [ '9', '10', '11', '12' ] | |
env: | |
CC: clang-${{ matrix.version }} | |
CXX: clang++-${{ matrix.version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Install compiler | |
run: | | |
echo 'Acquire::Retries "${INSTALL_COMPILER_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries | |
sudo mkdir -p /etc/apt/keyrings/ | |
curl --retry ${INSTALL_COMPILER_RETRIES} https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/llvm-snapshot.gpg | |
echo "deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.version }} main" | sudo tee /etc/apt/sources.list.d/llvm.list | |
sudo apt-get update | |
sudo apt-get install -y clang-${{ matrix.version }} libstdc++-7-dev libbsd-dev uuid-dev libidn11 | |
- name: Build | |
run: cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --cxx-hide-deprecation-message | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-clang-2004-${{ matrix.version }} | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
cpp-clang-ubuntu-2404-build: | |
name: C++ Clang ${{ matrix.version }} (Ubuntu 24.04) | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [ '13', '14', '15', '16', '17', '18' ] | |
env: | |
CC: clang-${{ matrix.version }} | |
CXX: clang++-${{ matrix.version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Install compiler | |
run: | | |
echo 'Acquire::Retries "${INSTALL_COMPILER_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries | |
sudo mkdir -p /etc/apt/keyrings/ | |
curl --retry ${INSTALL_COMPILER_RETRIES} https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/llvm-snapshot.gpg | |
echo "deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.version }} main" | sudo tee /etc/apt/sources.list.d/llvm.list | |
sudo apt-get update | |
sudo apt-get install -y clang-${{ matrix.version }} libbsd-dev uuid-dev | |
- name: Setup small temp file system | |
run: | | |
sudo mkdir -p /mnt/tmp_aeron_dir | |
sudo mount -t tmpfs -o size=20M,mode=777 tmpfs /mnt/tmp_aeron_dir | |
- name: Build | |
run: cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --cxx-hide-deprecation-message | |
- name: Remove small temp file system | |
if: always() | |
run: | | |
sudo umount /mnt/tmp_aeron_dir | |
sudo rm -rf /mnt/tmp_aeron_dir | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-clang-2404-${{ matrix.version }} | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
cpp-clang-debug-build: | |
name: C++ Clang ${{ matrix.version }} debug build | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [ '18' ] | |
env: | |
CC: clang-${{ matrix.version }} | |
CXX: clang++-${{ matrix.version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Install compiler | |
run: | | |
echo 'Acquire::Retries "${INSTALL_COMPILER_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries | |
sudo mkdir -p /etc/apt/keyrings/ | |
curl --retry ${INSTALL_COMPILER_RETRIES} https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/llvm-snapshot.gpg | |
echo "deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.version }} main" | sudo tee /etc/apt/sources.list.d/llvm.list | |
sudo apt-get update | |
sudo apt-get install -y clang-${{ matrix.version }} libbsd-dev uuid-dev | |
- name: Build | |
run: cppbuild/cppbuild --debug-build --cxx-hide-deprecation-message | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-clang-debug-${{ matrix.version }} | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
cpp-xcode-build: | |
name: C++ Xcode (macOS) | |
runs-on: macos-latest | |
env: | |
CC: clang | |
CXX: clang++ | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Setup small temp file system and localhost name | |
run: | | |
sudo sed -i bak "s/localhost/localhost $(hostname)/" /etc/hosts | |
dscacheutil -flushcache | |
sudo diskutil eraseDisk APFS tmp_aeron_dir $(hdiutil attach -nomount ram://$((2 * 1024 * 20))) | |
- name: Build | |
run: cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --cxx-hide-deprecation-message | |
- name: Remove small temp file system | |
run: sudo diskutil eject tmp_aeron_dir | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-xcode-latest | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
cpp-msvc-build: | |
name: C++ MSVC (Windows) | |
runs-on: windows-latest | |
env: | |
CC: cl | |
CXX: cl | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Setup small temp file system | |
run: | | |
$current_size = (Get-PartitionSupportedSize -DiskNumber 1 -PartitionNumber 1) | |
$new_size = ($current_size.SizeMax - 100 * 1024 * 1024) | |
Resize-Partition -DiskNumber 1 -PartitionNumber 1 -Size ($new_size) | |
New-Partition -DiskNumber 1 -Size 30MB -DriveLetter T | Format-Volume -FileSystem NTFS -Confirm:$false | |
mkdir T:/tmp_aeron_dir | |
- name: Build | |
run: cppbuild/cppbuild.ps1 --cxx-hide-deprecation-message | |
- name: Remove small temp file system | |
run: Remove-Partition -DriveLetter T -Confirm:$false | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" | Out-File $env:GITHUB_OUTPUT -Encoding utf8 -Append | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-msvc-latest | |
path: ${{ steps.copy_test_logs.outputs.file }} |