Support linking tongsuo dynamic library and using external ENGINE #572
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_dispatch: | |
pull_request: | |
schedule: | |
# Run every day at midnight UTC | |
- cron: '0 0 * * *' | |
jobs: | |
tongsuo_clone: | |
# This step ensures that all builders have the same version of Tongsuo | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Tongsuo repo | |
uses: actions/checkout@v4 | |
with: | |
repository: Tongsuo-Project/Tongsuo | |
ref: 8.4-stable | |
path: Tongsuo | |
- name: Archive Tongsuo source | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tongsuo-source | |
path: ${{ github.workspace }}/Tongsuo | |
build: | |
needs: tongsuo_clone | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, macos-13, macos-14, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Set up JDK 11 for toolchains | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- name: Set runner-specific environment variables | |
shell: bash | |
run: | | |
echo "TONGSUO_SRC=${{ runner.temp }}/Tongsuo" >> $GITHUB_ENV | |
echo "TONGSUO_HOME=${{ runner.temp }}/ts" >> $GITHUB_ENV | |
- name: Fetch Tongsuo source | |
uses: actions/download-artifact@v3 | |
with: | |
name: tongsuo-source | |
path: ${{ runner.temp }}/Tongsuo | |
- uses: actions/checkout@v2 | |
- name: Build Tongsuo on Linux or macOS | |
if: runner.os == 'Linux' || runner.os == 'macOS' | |
run: | | |
pushd ${{ runner.temp }}/Tongsuo | |
perl ./Configure --banner=Configured --prefix=$TONGSUO_HOME --libdir=$TONGSUO_HOME/lib enable-weak-ssl-ciphers enable-ntls | |
make -s -j4 | |
make install | |
popd | |
- uses: ilammy/msvc-dev-cmd@v1 | |
if: runner.os == 'Windows' | |
- uses: ilammy/setup-nasm@v1 | |
if: runner.os == 'Windows' | |
- uses: shogo82148/actions-setup-perl@v1 | |
if: runner.os == 'Windows' | |
- name: Build Tongsuo on Windows | |
if: runner.os == 'Windows' | |
run: | | |
cd $Env:TONGSUO_SRC | |
perl .\Configure --banner=Configured --prefix=$Env:TONGSUO_HOME no-capieng no-makedepend enable-weak-ssl-ciphers enable-ntls | |
nmake /S | |
nmake install | |
Get-ChildItem -Force -LiteralPath $Env:TONGSUO_HOME\lib | |
- name: Build with Gradle | |
shell: bash | |
run: | | |
./gradlew --version | |
./gradlew assemble -PcheckErrorQueue | |
- name: Test with Gradle | |
shell: bash | |
run: ./gradlew test -PcheckErrorQueue | |
- name: Other checks with Gradle | |
shell: bash | |
run: ./gradlew check -PcheckErrorQueue | |
- name: Build test JAR with dependencies | |
if: runner.os == 'Linux' | |
shell: bash | |
run: ./gradlew :tongsuo-openjdk:testJar -PcheckErrorQueue | |
- name: Upload test JAR with dependencies | |
if: runner.os == 'Linux' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: testjar | |
path: openjdk/build/libs/tongsuo-openjdk-*-tests.jar | |
if-no-files-found: error | |
- name: Build with Gradle based on Tongsuo dynamic library | |
shell: bash | |
run: | | |
./gradlew clean | |
./gradlew assemble -PcheckErrorQueue -PtongsuoDynamic=1 | |
- name: Test with Gradle based on Tongsuo dynamic library | |
shell: bash | |
run: ./gradlew test -PcheckErrorQueue -PtongsuoDynamic=1 | |
- name: Other checks with Gradle based on Tongsuo dynamic library | |
shell: bash | |
run: ./gradlew check -PcheckErrorQueue -PtongsuoDynamic=1 | |
- name: Build test JAR with dependencies based on Tongsuo dynamic library | |
if: runner.os == 'Linux' | |
shell: bash | |
run: ./gradlew :tongsuo-openjdk:testJar -PcheckErrorQueue -PtongsuoDynamic=1 |