Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "ci-linux Docker image"

on:
workflow_dispatch:
push:
branches:
- ci-linux

env:
DOCKER_USER_OPTION: '$UID:$GID'
SCCACHE_GCS_BUCKET: 'composable-build-artefacts'
RUSTC_WRAPPER: "/home/runner/.cargo/bin/sccache"
SCCACHE_GCS_RW_MODE: "READ_WRITE"

jobs:
build-and-publish:
runs-on:
- self-hosted
- linux
- x64
- sre
concurrency:
group: docker-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: true

steps:
- name: Clean up
continue-on-error: true
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
docker system prune --force --all --volumes

- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build Docker image
run: make containerize-ci-linux

- name: Docker push
run: make push-ci-linux
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ push-composable-sandbox:
@docker push ${REPO}/composable-sandbox:${COMMIT_SHA}
@docker push ${REPO}/composable-sandbox:latest

containerize-ci-linux:
@docker build -f docker/ci-linux.dockerfile \
-t ${REPO}/ci-linux:production \
.

push-ci-linux:
@docker push ${REPO}/ci-linux:production

stop:
@docker-compose down

Expand All @@ -98,8 +106,8 @@ else
endif


.PHONY: build test docs style-check lint udeps containerize dev push install stop containerize-release push-release containerize-composable-sandbox push-composable-sandbox

.PHONY: build test docs style-check lint udeps containerize dev push install stop containerize-release push-release
.PHONY: containerize-composable-sandbox push-composable-sandbox containerize-ci-linux push-ci-linux

#----------------------------------------------------------------------
# UTILITY FUNCTIONS TO remove
Expand Down
7 changes: 7 additions & 0 deletions docker/ci-linux.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM paritytech/ci-linux:production

RUN rustup toolchain uninstall nightly-2021-11-08 && \
rustup toolchain uninstall nightly && \
rustup toolchain install nightly-2021-11-29 && \
rustup target install wasm32-unknown-unknown --toolchain nightly-2021-11-29 && \
ln -s "${RUSTUP_HOME}/toolchains/nightly-2021-11-29-x86_64-unknown-linux-gnu" "${RUSTUP_HOME}/toolchains/nightly-x86_64-unknown-linux-gnu"