Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Add new GH workflow for the xbuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
chevdor committed Feb 1, 2023
1 parent 9e01024 commit 2a92cd8
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 1 deletion.
69 changes: 69 additions & 0 deletions .github/workflows/release-31_xbuilder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Release - xbuilder

on:
push:
tags:
# Catches v1.2.3 and v1.2.3-rc1
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:

env:
# We can use the following once https://github.com/paritytech/scripts/pull/504 is merged
# and the image is available
# DOCKER_ORG=paritytech
DOCKER_ORG: chevdor

jobs:
get-rust-versions:
runs-on: ubuntu-latest
container:
image: paritytech/ci-linux:production
outputs:
rustc-stable: ${{ steps.get-rust-versions.outputs.stable }}
rustc-nightly: ${{ steps.get-rust-versions.outputs.nightly }}
steps:
- id: get-rust-versions
run: |
echo "stable=$(rustc +stable --version)" >> $GITHUB_OUTPUT
echo "nightly=$(rustc +nightly --version)" >> $GITHUB_OUTPUT
xbuild:
runs-on: ubuntu-latest
strategy:
matrix:
target: [ aarch64-unknown-linux-gnu ]
profile: [ production ]
binary: [ polkadot ]

steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Set env for $ {{ matrix.target }}
run: |
image="${DOCKER_ORG}/parity-xbuilder-${{ matrix.target }}"
echo "DOCKER_IMAGE-${{ matrix.target }}=$image" >> $GITHUB_ENV
- name: Pull xbuilder image for ${{ matrix.target }}
env:
IMAGE=${DOCKER_IMAGE}-${{ matrix.target }}
run: |
echo "Pulling image: $IMAGE"
docker pull "IMAGE"
- name: Build ${{ matrix.binary }} for target ${{ matrix.target }} using profile ${{ matrix.profile }}
env:
IMAGE=${DOCKER_IMAGE}-${{ matrix.target }}
run: |
docker run --rm -ti \
-v $PWD:/app ${IMAGE} \
-p ${{ matrix.binary }} \
--profile ${{ matrix.profile }}
ls -al ./target/${{ matrix.target }}/${{ matrix.profile }}/${{ matrix.binary }}
- name: Upload ${{ matrix.binary }} / ${{ matrix.target }} / ${{ matrix.profile }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.binary }}_${{ matrix.target }}_${{ matrix.profile }}
path: |
./target/${{ matrix.target }}/${{ matrix.profile }}/${{ matrix.binary }}
2 changes: 1 addition & 1 deletion .github/workflows/release-99_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: 'Ledger <> Polkadot Coordination'
room: '!EoIhaKfGPmFOBrNSHT:web3.foundation'
pre-release: true

runs-on: ubuntu-latest
steps:
- name: Send Matrix message to ${{ matrix.channel.name }}
Expand Down

0 comments on commit 2a92cd8

Please sign in to comment.