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
2 changes: 1 addition & 1 deletion .github/workflows/pr-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ jobs:
sandbox = relaxed
narinfo-cache-negative-ttl = 0
system-features = kvm
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Set up Cachix
uses: cachix/cachix-action@586bf280495080c5a6d4868237ad28a860e4b309
with:
Expand Down
60 changes: 13 additions & 47 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,81 +5,47 @@ on:
- 'release-v[0-9]+\.[0-9]+\.[0-9]+'

env:
NIX_VERSION: nix-2.13.2
NIXPKGS_CHANNEL: nixos-22.11
CACHIX_COMPOSABLE: composable-community
CACHIX_COMPRESSION_LEVEL: 16
CACHIX_JOBS: 8
CACHIX_COMPRESSION_METHOD: zstd
CACHIX_NAME: composable-community
DOCKER_REGISTRY_NAME: composablefi
DOCKER_USER_OPTION: '$UID:$GID'

jobs:
release-artifacts:
name: "release-artifacts"
runs-on:
- self-hosted
- x64-monster
- x86_64-linux-32C-128GB-2TB
permissions:
pull-requests: write
contents: write
concurrency:
group: release-artifacts-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Set up Nix
uses: cachix/install-nix-action@daddc62a2e67d1decb56e028c9fa68344b9b7c2a # v18
with:
install_url: https://releases.nixos.org/nix/${{ env.NIX_VERSION }}/install
nix_path: nixpkgs=channel:${{ env.NIXPKGS_CHANNEL }}
extra_nix_config: |
sandbox = relaxed
narinfo-cache-negative-ttl = 0
system-features = kvm
- name: Set up Cachix
uses: cachix/cachix-action@298387a7aea14d6564aa5d6ead79272878339c8b # v12
steps:
- uses: cachix/cachix-action@586bf280495080c5a6d4868237ad28a860e4b309
with:
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
name: ${{ env.CACHIX_NAME }}
- name: Add tools needed for non-nix steps
run: |
nix-channel --add https://nixos.org/channels/${{ env.NIXPKGS_CHANNEL }} nixpkgs
nix-channel --update
nix-env -iA nixpkgs.cachix nixpkgs.git nixpkgs.git-lfs nixpkgs.docker nixpkgs.coreutils
name: composable-community
installCommand: "true"
skipAddingSubstituter: true
- uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Build runtime
run: |
cachix watch-exec --compression-level $CACHIX_COMPRESSION_LEVEL $CACHIX_COMPOSABLE nix -- build .#picasso-runtime
cachix watch-exec --compression-level $CACHIX_COMPRESSION_LEVEL $CACHIX_COMPOSABLE nix -- build .#composable-runtime
cachix watch-exec --compression-level $CACHIX_COMPRESSION_LEVEL $CACHIX_COMPOSABLE nix -- build .#picasso-testfast-runtime
cachix watch-exec --compression-level $CACHIX_COMPRESSION_LEVEL $CACHIX_COMPOSABLE nix -- build .#composable-testfast-runtime
cachix watch-exec --compression-level $CACHIX_COMPRESSION_LEVEL $CACHIX_COMPOSABLE nix -- build .#composable-node
cachix watch-exec --compression-level $CACHIX_COMPRESSION_LEVEL $CACHIX_COMPOSABLE nix -- build .#devnet-image
- run: |
nix run .#generate-release-artifacts --print-build-logs
echo "COMPOSABLE_VERSION=$(nix eval --raw .#composable-node.version)" >> $GITHUB_ENV

- name: Release Docker image
run: |
COMPOSABLE_VERSION=$(nix eval --raw .#composable-node.version)
docker load --input release-artifacts/composable-image
docker tag composable:latest "${{ env.DOCKER_REGISTRY_NAME }}/composable:v${{ env.COMPOSABLE_VERSION }}"
docker tag composable:latest "${{ env.DOCKER_REGISTRY_NAME }}/composable:v$COMPOSABLE_VERSION"
docker tag composable:latest "${{ env.DOCKER_REGISTRY_NAME }}/composable:latest-prerelease"
docker push "${{ env.DOCKER_REGISTRY_NAME }}/composable:v${{ env.COMPOSABLE_VERSION }}"
docker push "${{ env.DOCKER_REGISTRY_NAME }}/composable:v$COMPOSABLE_VERSION"
docker push "${{ env.DOCKER_REGISTRY_NAME }}/composable:latest-prerelease"

docker load --input release-artifacts/devnet-image
docker tag devnet:latest "${{ env.DOCKER_REGISTRY_NAME }}/devnet:v${{ env.COMPOSABLE_VERSION }}"
docker tag devnet:latest "${{ env.DOCKER_REGISTRY_NAME }}/devnet:v$COMPOSABLE_VERSION"
docker tag devnet:latest "${{ env.DOCKER_REGISTRY_NAME }}/devnet:latest-prerelease"
docker push "${{ env.DOCKER_REGISTRY_NAME }}/devnet:v${{ env.COMPOSABLE_VERSION }}"
docker push "${{ env.DOCKER_REGISTRY_NAME }}/devnet:v$COMPOSABLE_VERSION"
docker push "${{ env.DOCKER_REGISTRY_NAME }}/devnet:latest-prerelease"

- name: Release artifacts
Expand Down
1 change: 1 addition & 0 deletions code/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.