action.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. # Always follow https://download.01.org/intel-sgx/latest/linux-latest/docs/
  4. name: "Install Intel SGX SDK"
  5. description: "Installs the Intel SGX SDK and necessary libraries for Ubuntu."
  6. author: "Intel Corporation"
  7. inputs:
  8. os:
  9. description: "Operating system to install on (ubuntu-22.04)"
  10. required: true
  11. runs:
  12. using: "composite"
  13. steps:
  14. - name: Check Runner OS
  15. if: ${{ inputs.os != 'ubuntu-22.04' }}
  16. shell: bash
  17. run: |
  18. echo "::error title=⛔ error hint::Only support ubuntu-22.04 for now"
  19. exit 1
  20. - name: Create installation directory
  21. shell: bash
  22. run: sudo mkdir -p /opt/intel
  23. - name: Download and install SGX SDK on ubuntu-22.04
  24. if: ${{ inputs.os == 'ubuntu-22.04' }}
  25. shell: bash
  26. run: |
  27. sudo wget -O sgx_linux_x64_sdk.bin https://download.01.org/intel-sgx/sgx-linux/2.25/distro/ubuntu22.04-server/sgx_linux_x64_sdk_2.25.100.3.bin
  28. sudo chmod +x sgx_linux_x64_sdk.bin
  29. echo 'yes' | sudo ./sgx_linux_x64_sdk.bin
  30. working-directory: /opt/intel
  31. - name: Add SGX repository and install libraries
  32. shell: bash
  33. run: |
  34. echo "deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/intel-sgx.list
  35. wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo apt-key add -
  36. sudo apt update
  37. sudo apt install -y libsgx-launch libsgx-urts
  38. - name: Source SGX SDK environment
  39. shell: bash
  40. run: source /opt/intel/sgxsdk/environment