diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1f39895..e49954d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,10 +33,16 @@ jobs: - name: Install additional dependencies run: | - sudo apt-key adv --fetch-keys 'https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key' - sudo add-apt-repository 'deb https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' - sudo apt-key adv --fetch-keys 'https://apt.llvm.org/llvm-snapshot.gpg.key' - sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' + add_repository_with_key() { + export gpg_key="$1.gpg" + export repo_str="$2" + cat "$1" | gpg --dearmor > "$gpg_key" + sudo install -o root -g root -m 644 "$gpg_key" /usr/share/keyrings/ + sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/$gpg_key] $repo_str" >> /etc/apt/sources.list.d/additional-dependencies-focal.list' + sudo rm "$gpg_key" + } + add_repository_with_key intel-sgx-deb.key "https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main" + add_repository_with_key llvm-snapshot.gpg.key "http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main" sudo apt-get update -y sudo apt-get install -y faketime protobuf-compiler libsgx-dcap-ql-dev clang-11 musl-tools