Skip to content

Commit

Permalink
ci: updating workflows to support cross compilation (#623)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
NikolaMilosa and github-actions[bot] committed Jul 17, 2024
1 parent f2559b3 commit 8376051
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=mold"]

[alias]
dremac = "zigbuild --bin dre --release --target x86_64-apple-darwin"
drecross = "zigbuild --bin dre --release --target x86_64-apple-darwin"
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on:
labels: dre-runner-custom
# This image is based on ubuntu:20.04
container: ghcr.io/dfinity/dre/actions-runner:9994667f9257350d20c17f8bcbb2d7b3392f39b9
container: ghcr.io/dfinity/dre/actions-runner:e7053069fd8a084a19b410af4dbcba74048136c4
steps:
- uses: actions/checkout@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/msd-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- "main"
paths:
- 'rs/ic-observability/multiservice-discovery*/src/**'
- "rs/ic-observability/multiservice-discovery*/src/**"
workflow_dispatch:

concurrency:
Expand All @@ -17,7 +17,7 @@ jobs:
runs-on:
labels: dre-runner-custom
# This image is based on ubuntu:20.04
container: ghcr.io/dfinity/dre/actions-runner:9994667f9257350d20c17f8bcbb2d7b3392f39b9
container: ghcr.io/dfinity/dre/actions-runner:e7053069fd8a084a19b410af4dbcba74048136c4
steps:
- uses: actions/checkout@v4
with:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/prepare-release/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ inputs:
runs:
using: composite
steps:
- name: "🔨 Build binaries for other targets"
shell: bash
run: |
cargo drecross
- name: "⚒️ Extract binaries from bazel, so they can be pushed as GitHub artifacts in the next steps"
shell: bash
run: |
set -eExuo pipefail
# query the location of the bazel "dre" binary and copy it to the "release" directory
mkdir -p release
cp --dereference bazel-out/k8-opt/bin/rs/cli/dre release/dre
cp --dereference bazel-out/k8-opt/bin/rs/cli/dre release/dre-x86_64-unknown-linux
cp target/x86_64-apple-darwin/release/dre release/dre-x86_64-apple-darwin
- name: "🆕 📢 Prepare release"
# v0.1.15
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on:
labels: dre-runner-custom
# This image is based on ubuntu:20.04
container: ghcr.io/dfinity/dre/actions-runner:9994667f9257350d20c17f8bcbb2d7b3392f39b9
container: ghcr.io/dfinity/dre/actions-runner:e7053069fd8a084a19b410af4dbcba74048136c4
name: Test changed-files
steps:
- uses: actions/checkout@v4
Expand All @@ -27,9 +27,9 @@ jobs:
if: ${{ steps.changed-files.outputs.all_changed_files_count > 0 && steps.changed-files.outputs.other_changed_files_count == 0 }}
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'bazel'
description: 'Passed'
state: 'success'
context: "bazel"
description: "Passed"
state: "success"
sha: ${{github.event.pull_request.head.sha || github.sha}}

- name: Run checks for release index
Expand Down
2 changes: 1 addition & 1 deletion Cargo.Bazel.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"checksum": "be974b7fc92bfbfc7ffdc5895ee9b7070b1b6d54d1b7c3a3cd1604141467fd3c",
"checksum": "9182f130d091414a1b5ff9d33ff24a129b9ff4af2780d3f2463805086c49da66",
"crates": {
"actix-codec 0.5.2": {
"name": "actix-codec",
Expand Down

0 comments on commit 8376051

Please sign in to comment.