Extend upd_aggregate
and add/del_publisher
to support 64 price components on pythnet
#2545
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
name: Docker | |
on: | |
push: | |
branches: [ main ] | |
tags : | |
- oracle-v* | |
pull_request: | |
branches: [ main ] | |
env: | |
SOLANA_VERSION: 1.14.7 # Using 1.14.x to have sbf instead of bpf. bpf does not work anymore. | |
SOLANA_DOCKER_IMAGE_HASH: 9130b4a26ec00c4ba99c023da98c06abb0dba2904c990af7770928e0f7dfd2d5 | |
DOCKER_HUB: docker.io | |
DOCKER_USER: ${{ secrets.DOCKER_IO_USER }} | |
IS_RELEASE: ${{ | |
startsWith( github.ref, 'refs/tags/pythd-' ) || | |
startsWith( github.ref, 'refs/tags/oracle-' ) }} | |
IS_ORACLE_RELEASE: ${{ | |
startsWith( github.ref, 'refs/tags/oracle-' ) }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Initialize Environment | |
run: | | |
set -eux | |
REPO_NAME="$( basename "${GITHUB_REPOSITORY}" )" | |
REF_NAME="$( basename "${GITHUB_REF}" )" | |
echo "DOCKER_IMAGE=${REPO_NAME}:${REF_NAME}" >> "${GITHUB_ENV}" | |
- name: Build Docker Image | |
run: | | |
set -eux | |
docker build \ | |
--file docker/Dockerfile \ | |
--build-arg SOLANA_VERSION="${SOLANA_VERSION}" \ | |
--build-arg SOLANA_DOCKER_IMAGE_HASH="${SOLANA_DOCKER_IMAGE_HASH}" \ | |
--tag "${DOCKER_IMAGE}" \ | |
. | |
- name: Publish Docker Image | |
if: env.IS_RELEASE == 'true' | |
run: | | |
function publish() { | |
set -eux | |
PUB_IMAGE="${DOCKER_HUB}/${DOCKER_USER}/${DOCKER_IMAGE}" | |
docker login "${DOCKER_HUB}" -u "${DOCKER_USER}" --password-stdin | |
docker image tag "${DOCKER_IMAGE}" "${PUB_IMAGE}" | |
docker image push "${PUB_IMAGE}" | |
} | |
echo "${{ secrets.DOCKER_IO_PASS }}" | publish | |
- name : Get binary from docker | |
if : env.IS_ORACLE_RELEASE == 'true' | |
run : | | |
docker create -ti --name container "${DOCKER_IMAGE}" bash | |
docker cp container:/home/pyth/pyth-client/target/pyth/pythnet/pyth_oracle_pythnet.so . | |
docker cp container:/home/pyth/pyth-client/target/pyth/solana/pyth_oracle_solana.so . | |
docker rm -f container | |
- name : Publish Solana binary | |
if : env.IS_ORACLE_RELEASE == 'true' | |
uses: svenstaro/upload-release-action@133984371c30d34e38222a64855679a414cb7575 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./pyth_oracle_solana.so | |
asset_name: pyth_oracle_solana.so | |
tag: ${{ github.ref }} | |
- name : Publish Pythnet binary | |
if : env.IS_ORACLE_RELEASE == 'true' | |
uses: svenstaro/upload-release-action@133984371c30d34e38222a64855679a414cb7575 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./pyth_oracle_pythnet.so | |
asset_name: pyth_oracle_pythnet.so | |
tag: ${{ github.ref }} | |
pinning: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source | |
uses: actions/checkout@v2 | |
- run: chmod 755 ./scripts/check-docker-pin.sh | |
- run: ./scripts/check-docker-pin.sh |