Skip to content

Upload artifacts

Upload artifacts #10

Workflow file for this run

name: Release
on:
push:
branches:
- main
- gha_release
tags:
- "ccf-0.*"
workflow_dispatch:
permissions:
contents: read
actions: read
checks: write
jobs:
check_release_notes:
name: "Check Release Notes"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: "Check Release Notes"
run: |
set -ex
# python scripts/extract-release-notes.py --target-git-version
shell: bash
build_release:
needs: check_release_notes
name: Release
strategy:
matrix:
platform:
- name: virtual
image: default
nodes: [self-hosted, 1ES.Pool=gha-virtual-ccf-sub]
options: --user root --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE -v /lib/modules:/lib/modules:ro
- name: snp
image: default
nodes: [self-hosted, 1ES.Pool=gha-virtual-ccf-sub]
options: --user root --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE -v /lib/modules:/lib/modules:ro
- name: sgx
image: sgx
nodes: [self-hosted, 1ES.Pool=gha-sgx-ccf-sub]
options: --user root --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --device /dev/sgx_enclave:/dev/sgx_enclave --device /dev/sgx_provision:/dev/sgx_provision -v /dev/sgx:/dev/sgx -v /lib/modules:/lib/modules:ro
runs-on: ${{ matrix.platform.nodes }}
container:
image: ghcr.io/microsoft/ccf/ci/${{ matrix.platform.image }}:build-26-06-2024
options: ${{ matrix.platform.options }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Build Release ${{ matrix.platform.name }}"
run: |
set -ex
git config --global --add safe.directory /__w/CCF/CCF
mkdir build
cd build
cmake -GNinja -DCOMPILE_TARGET=${{ matrix.platform.name }} -DCLIENT_PROTOCOLS_TEST=ON ..
ninja
shell: bash
- name: "Make .deb Package"
id: make_deb
run: |
set -ex
set -o pipefail
cmake -L .. 2>/dev/null | grep CMAKE_INSTALL_PREFIX: | cut -d = -f 2 > /tmp/install_prefix
cpack -V -G DEB
INITIAL_PKG=`ls *.deb`
CCF_GITHUB_PKG=${INITIAL_PKG//\~/_}
if [[ "$INITIAL_PKG" != "$CCF_GITHUB_PKG" ]]; then
mv $INITIAL_PKG $CCF_GITHUB_PKG
fi
echo "name=$CCF_GITHUB_PKG" >> $GITHUB_OUTPUT
shell: bash
- name: "Upload .deb Package"
uses: actions/upload-artifact@v4
with:
name: pkg-${{ matrix.platform.name }}
path: ${{ steps.make_deb.outputs.name }}