Merge pull request #98 from salesforce/fix-ci-build #187
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: build-check | |
| on: [push, pull_request] | |
| jobs: | |
| ubuntu: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - name: Cache vendor/ | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor/ | |
| key: ${{ runner.OS }}-p4-fusion-vendor-cache-${{ github.ref }} | |
| restore-keys: | | |
| ${{ runner.OS }}-p4-fusion-vendor-cache- | |
| # Adopted from: https://github.com/sourcegraph/sourcegraph/blob/main/cmd/gitserver/p4-fusion-install-alpine.sh#L82 | |
| - name: Install OpenSSL 1.1.1w | |
| run: | | |
| pushd vendor | |
| mkdir -p openssl-src | |
| wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz | |
| tar -C openssl-src -xzf openssl-1.1.1w.tar.gz --strip 1 | |
| pushd openssl-src | |
| ./config | |
| make build_libs | |
| sudo make install | |
| popd | |
| popd | |
| - name: Install Helix Core C++ API | |
| run: | | |
| mkdir -p vendor/helix-core-api/linux | |
| wget https://www.perforce.com/downloads/perforce/r24.1/bin.linux26x86_64/p4api-glibc2.12-openssl1.1.1.tgz | |
| tar -C vendor/helix-core-api/linux -xzf p4api-glibc2.12-openssl1.1.1.tgz --strip 1 | |
| - name: Configure CMake cache | |
| run: | | |
| ./generate_cache.sh Release pt | |
| - name: Build p4-fusion | |
| run: | | |
| ./build.sh | |
| - name: Test p4-fusion | |
| run: | | |
| ldd build/p4-fusion/p4-fusion | |
| ./build/p4-fusion/p4-fusion | |
| ./build/tests/p4-fusion-test |