Merge pull request #31 from yxk123/main #8
This file contains hidden or 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: maven-ci-release-macos | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| BUILD_TYPE: Release | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up JDK 18 | |
| uses: actions/setup-java@v2 | |
| with: | |
| java-version: '18' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Download GmSSL release | |
| run: curl -L "https://github.com/guanzhi/GmSSL/archive/refs/tags/v3.1.1.zip" -o "GmSSL.zip" | |
| - name: Extract GmSSL | |
| run: unzip GmSSL.zip | |
| - name: Build GmSSL | |
| run: | | |
| cd GmSSL-3.1.1 | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_OSX_ARCHITECTURES=x86_64 | |
| make | |
| sudo make install | |
| - name: Set DYLD_LIBRARY_PATH | |
| run: echo "DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV | |
| - name: Verify Installation and Environment | |
| run: gmssl version | |
| - name: Build with Maven | |
| run: mvn clean install | |
| - name: Clean up | |
| if: always() | |
| run: rm GmSSL.zip |