Skip to content

Commit

Permalink
Upload Linux and macOS binaries via GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jrprice committed Oct 17, 2021
1 parent c9cdb32 commit 308df35
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
35 changes: 25 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
needs: [check-format]
env:
LLVM_VERSION: ${{ matrix.llvm }}
INSTALL_DIR: "${{ github.workspace }}/install"
strategy:
matrix:
os: [ubuntu-20.04, macos-11.0]
Expand Down Expand Up @@ -60,15 +61,10 @@ jobs:
fi
- name: Create build dir
run: cmake -E make_directory build
- name: cache-oclgrind
uses: actions/cache@v2
with:
path: install
key: oclgrind-${{ matrix.os }}-llvm-${{ matrix.llvm }}-${{ matrix.compiler }}-${{ matrix.build_type }}-${{github.sha}}
- name: CMake
run: >
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=$PWD/../install \
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
-DLLVM_DIR="$LLVM_DIR"
working-directory: build
- name: Build
Expand All @@ -80,6 +76,22 @@ jobs:
- name: Install
run: cmake --install . --config ${{ matrix.build_type }}
working-directory: build
- name: Prepare build artifact
shell: bash
run: |
if [[ "${{ matrix.os }}" =~ ubuntu-.* ]]; then
cp src/install/INSTALL.linux ${INSTALL_DIR}
elif [[ "${{ matrix.os }}" =~ macos-.* ]]; then
cp src/install/INSTALL.darwin ${INSTALL_DIR}
fi
mv ${INSTALL_DIR} oclgrind-${RELEASE_VERSION}
mkdir -p artifact
tar czf artifact/oclgrind-${RELEASE_VERSION}.tgz oclgrind-${RELEASE_VERSION}
- name: Upload build artifact
uses: actions/upload-artifact@v2
with:
name: Oclgrind-${{ env.RELEASE_VERSION }}-${{ matrix.os }}-llvm${{ matrix.llvm }}-${{ matrix.build_type }}-${{ matrix.compiler }}
path: artifact

build-windows:
name: Build ${{ matrix.platform }} llvm-${{ matrix.llvm }}
Expand Down Expand Up @@ -277,11 +289,14 @@ jobs:
- uses: actions/checkout@v2
- name: Install dependencies
run: bash .github/workflows/install-deps.sh
- name: cache-oclgrind
uses: actions/cache@v2
- name: Download Oclgrind
uses: actions/download-artifact@v2
with:
path: install
key: oclgrind-ubuntu-20.04-llvm-13-gcc-Release-${{github.sha}}
name: Oclgrind-${{ env.RELEASE_VERSION }}-ubuntu-20.04-llvm${{ env.RELEASE_LLVM }}-Release-gcc
- name: Unpack Oclgrind
shell: bash
run: |
tar xf oclgrind-${RELEASE_VERSION}.tgz
- name: cache-cts
uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-cts-suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi

retcode=0

export PATH=$PWD/install/bin:$PATH
export PATH=$PWD/oclgrind-${RELEASE_VERSION}/bin:$PATH
export CL_CONFORMANCE_RESULTS_FILENAME=$PWD/result.json
echo oclgrind opencl-cts/build/test_conformance/${ctsdir}/${ctsbin} ${ctsargs}
oclgrind opencl-cts/build/test_conformance/${ctsdir}/${ctsbin} ${ctsargs}
Expand Down

0 comments on commit 308df35

Please sign in to comment.