Bump version to 0.6.2 #19
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
# GitHub Actions: Automated multi-platform releases of opencl-language-server | |
name: Release | |
on: | |
push: | |
tags: | |
- '[0-9]+.*' | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
create_release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
outputs: | |
upload_url: ${{steps.create_release.outputs.upload_url}} | |
steps: | |
- name: Create release | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
with: | |
name: Release ${{github.ref}} | |
tag: ${{github.ref}} | |
draft: true | |
prerelease: false | |
build_release: | |
name: Build Release | |
runs-on: ${{ matrix.config.os }} | |
permissions: | |
contents: write | |
needs: create_release | |
strategy: | |
matrix: | |
config: | |
- os: windows-latest | |
- os: macos-latest | |
- os: ubuntu-20.04 | |
python-version: [3.9] | |
env: | |
CONAN_HOME: ${{ github.workspace }}/.conan-home | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Linux - Install prerequisites | |
if: "contains(matrix.config.os, 'ubuntu')" | |
run: | | |
sudo apt update | |
sudo apt install gcc-9-aarch64-linux-gnu g++-9-aarch64-linux-gnu | |
ls /usr/bin/ | grep aarch64 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Create virtual environment | |
run: python3 -m venv .pyenv | |
- name: Windows - Activate virtual environment | |
if: "contains(matrix.config.os, 'windows')" | |
run: .pyenv\Scripts\activate.bat | |
- name: Unix - Activate virtual environment | |
if: "!contains(matrix.config.os, 'windows')" | |
run: source .pyenv/bin/activate | |
- name: Setup environment | |
run: | | |
pip3 install wheel | |
pip3 install -r requirements.txt | |
conan profile detect | |
# The following step is copied from the build.yml. | |
# TODO: reuse if when needed (#17, #24) | |
# - name: Cache libclang | |
# id: cache-libclang | |
# uses: actions/cache@v3 | |
# env: | |
# cache-name: cache-libclang | |
# with: | |
# path: .build/_deps/libclang-subbuild/libclang-populate-prefix/src/*.7z | |
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('libclang/libclang-urls.txt') }} | |
- name: Windows - Configure & Build (Release) | |
if: "contains(matrix.config.os, 'windows')" | |
run: | | |
python3 build.py conan-install | |
python3 build.py configure | |
python3 build.py build | |
- name: Windows - Archive Artifact | |
if: "contains(matrix.config.os, 'windows')" | |
run: | | |
cd ${{github.workspace}}/.build/Release | |
7z a -tzip opencl-language-server-win32-x86_64.zip opencl-language-server.exe | |
- name: Windows - Upload Artifact | |
if: "contains(matrix.config.os, 'windows')" | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{github.token}} | |
with: | |
upload_url: ${{needs.create_release.outputs.upload_url}} | |
asset_path: ${{github.workspace}}/.build/Release/opencl-language-server-win32-x86_64.zip | |
asset_name: opencl-language-server-win32-x86_64.zip | |
asset_content_type: application/zip | |
- name: Linux - Configure & Build (Release) | |
if: "contains(matrix.config.os, 'ubuntu')" | |
run: | | |
./build.py conan-install -o .conan-x86_64 -pr:h profiles/linux.release.x86_64 | |
./build.py configure -t .conan-x86_64/build/Release/generators/conan_toolchain.cmake -b .build-x86_64 -bt Release | |
./build.py build -b .build-x86_64 | |
file .build-x86_64/opencl-language-server | |
./build.py conan-install -o .conan-armv8 -pr:h profiles/linux.release.armv8 | |
./build.py configure -t .conan-armv8/build/Release/generators/conan_toolchain.cmake -b .build-armv8 -bt Release | |
./build.py build -b .build-armv8 | |
file .build-armv8/opencl-language-server | |
- name: Linux - Archive Artifact | |
if: "contains(matrix.config.os, 'ubuntu')" | |
run: | | |
cd ${{github.workspace}}/.build-x86_64/ | |
tar -czvf opencl-language-server-linux-x86_64.tar.gz opencl-language-server | |
cd ${{github.workspace}}/.build-armv8/ | |
tar -czvf opencl-language-server-linux-arm64.tar.gz opencl-language-server | |
- name: Linux - Upload Artifact (x86_64) | |
if: "contains(matrix.config.os, 'ubuntu')" | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{github.token}} | |
with: | |
upload_url: ${{needs.create_release.outputs.upload_url}} | |
asset_path: ${{github.workspace}}/.build-x86_64/opencl-language-server-linux-x86_64.tar.gz | |
asset_name: opencl-language-server-linux-x86_64.tar.gz | |
asset_content_type: application/gzip | |
- name: Linux - Upload Artifact (armv8) | |
if: "contains(matrix.config.os, 'ubuntu')" | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{github.token}} | |
with: | |
upload_url: ${{needs.create_release.outputs.upload_url}} | |
asset_path: ${{github.workspace}}/.build-armv8/opencl-language-server-linux-arm64.tar.gz | |
asset_name: opencl-language-server-linux-arm64.tar.gz | |
asset_content_type: application/gzip | |
- name: Mac - Configure & Build (Release) | |
if: "contains(matrix.config.os, 'macos')" | |
run: | | |
./build.py conan-install -o .conan-x86_64 -pr:h profiles/darwin.release.x86_64 | |
./build.py configure -t .conan-x86_64/build/Release/generators/conan_toolchain.cmake -b .build-x86_64 -bt Release | |
./build.py build -b .build-x86_64 | |
file .build-x86_64/opencl-language-server | |
./build.py conan-install -o .conan-armv8 -pr:h profiles/darwin.release.armv8 | |
./build.py configure -t .conan-armv8/build/Release/generators/conan_toolchain.cmake -b .build-armv8 -bt Release | |
./build.py build -b .build-armv8 | |
file .build-armv8/opencl-language-server | |
mkdir -p .build-universal/ | |
lipo -create -output .build-universal/opencl-language-server .build-x86_64/opencl-language-server .build-armv8/opencl-language-server | |
lipo -archs .build-universal/opencl-language-server | |
file .build-universal/opencl-language-server | |
- name: Mac - Archive Artifact | |
if: "contains(matrix.config.os, 'macos')" | |
run: | | |
cd ${{github.workspace}}/.build-x86_64/ | |
tar -czvf opencl-language-server-darwin-x86_64.tar.gz opencl-language-server | |
cd ${{github.workspace}}/.build-armv8/ | |
tar -czvf opencl-language-server-darwin-arm64.tar.gz opencl-language-server | |
cd ${{github.workspace}}/.build-universal/ | |
tar -czvf opencl-language-server-darwin-universal.tar.gz opencl-language-server | |
- name: Mac - Upload Artifact (x86_64) | |
if: "contains(matrix.config.os, 'macos')" | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{github.token}} | |
with: | |
upload_url: ${{needs.create_release.outputs.upload_url}} | |
asset_path: ${{github.workspace}}/.build-x86_64/opencl-language-server-darwin-x86_64.tar.gz | |
asset_name: opencl-language-server-darwin-x86_64.tar.gz | |
asset_content_type: application/gzip | |
- name: Mac - Upload Artifact (armv8) | |
if: "contains(matrix.config.os, 'macos')" | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{github.token}} | |
with: | |
upload_url: ${{needs.create_release.outputs.upload_url}} | |
asset_path: ${{github.workspace}}/.build-armv8/opencl-language-server-darwin-arm64.tar.gz | |
asset_name: opencl-language-server-darwin-arm64.tar.gz | |
asset_content_type: application/gzip | |
- name: Mac - Upload Artifact (universal) | |
if: "contains(matrix.config.os, 'macos')" | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{github.token}} | |
with: | |
upload_url: ${{needs.create_release.outputs.upload_url}} | |
asset_path: ${{github.workspace}}/.build-universal/opencl-language-server-darwin-universal.tar.gz | |
asset_name: opencl-language-server-darwin-universal.tar.gz | |
asset_content_type: application/gzip | |
- name: Archive Licenses | |
if: "contains(matrix.config.os, 'ubuntu')" | |
run: | | |
cd ${{github.workspace}}/.conan-x86_64 | |
tar -czvf licenses.tar.gz licenses | |
- name: Upload Licenses | |
if: "contains(matrix.config.os, 'ubuntu')" | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{github.token}} | |
with: | |
upload_url: ${{needs.create_release.outputs.upload_url}} | |
asset_path: ${{github.workspace}}/.conan-x86_64/licenses.tar.gz | |
asset_name: licenses.tar.gz | |
asset_content_type: application/gzip |