Skip to content

Commit 1c6fded

Browse files
committed
fix workflows
1 parent f589c11 commit 1c6fded

File tree

4 files changed

+87
-25
lines changed

4 files changed

+87
-25
lines changed

.github/workflows/build_dev_exe.yml

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ permissions:
88
contents: write
99

1010
jobs:
11-
1211
check_release:
13-
if: "contains(github.event.release.tag_name, '-dev')" # continue if the tag ends with -dev
12+
if: "contains(github.event.release.tag_name, '-dev')" # continue if the tag ends with -dev
1413
runs-on: ubuntu-latest
1514
steps:
1615
- name: Echo tag
@@ -24,11 +23,43 @@ jobs:
2423
strategy:
2524
matrix:
2625
include:
27-
- { runner: macos-latest, osname: macOS, arch: amd64, target: x86_64-apple-darwin, command: build }
28-
- { runner: macos-latest, osname: macOS, arch: arm64, target: aarch64-apple-darwin, command: build }
29-
- { runner: ubuntu-latest, osname: linux, arch: amd64, target: x86_64-unknown-linux-gnu, command: build }
30-
- { runner: ubuntu-latest, osname: linux, arch: arm64, target: aarch64-unknown-linux-gnu, command: build, build_args: --no-default-features }
31-
- { runner: windows-latest, osname: windows, arch: amd64, target: x86_64-pc-windows-msvc, command: build, extension: ".exe" }
26+
- {
27+
runner: macos-latest,
28+
osname: macOS,
29+
arch: amd64,
30+
target: x86_64-apple-darwin,
31+
command: build,
32+
}
33+
- {
34+
runner: macos-latest,
35+
osname: macOS,
36+
arch: arm64,
37+
target: aarch64-apple-darwin,
38+
command: build,
39+
}
40+
- {
41+
runner: ubuntu-latest,
42+
osname: linux,
43+
arch: amd64,
44+
target: x86_64-unknown-linux-gnu,
45+
command: build,
46+
}
47+
- {
48+
runner: ubuntu-latest,
49+
osname: linux,
50+
arch: arm64,
51+
target: aarch64-unknown-linux-gnu,
52+
command: build,
53+
build_args: --no-default-features,
54+
}
55+
- {
56+
runner: windows-latest,
57+
osname: windows,
58+
arch: amd64,
59+
target: x86_64-pc-windows-msvc,
60+
command: build,
61+
extension: ".exe",
62+
}
3263
# - { runner: windows-latest, osname: windows, arch: arm64, target: aarch64-pc-windows-msvc, command: build, extension: ".exe", toolchain: nightly }
3364

3465
steps:
@@ -44,31 +75,29 @@ jobs:
4475
with:
4576
command: ${{ matrix.command }}
4677
target: ${{ matrix.target }}
47-
args: "--locked --release ${{ matrix.build_args }}"
78+
args: "--bin dkn-compute --locked --release ${{ matrix.build_args }}"
4879
strip: true
4980

5081
- name: Prepare Release File
5182
run: |
5283
# move the binary
5384
mv target/${{ matrix.target }}/release/dkn-compute${{ matrix.extension }} ./dkn-compute-binary-${{ matrix.osname }}-${{ matrix.arch }}${{ matrix.extension }}
54-
5585
5686
- name: Upload Launch Artifacts
5787
uses: actions/upload-artifact@v4
5888
with:
5989
name: dkn-compute-binary-${{ matrix.osname }}-${{ matrix.arch }}
6090
path: dkn-compute-binary-${{ matrix.osname }}-${{ matrix.arch }}${{ matrix.extension }}
6191

62-
6392
release:
6493
needs: build
6594
runs-on: ubuntu-latest
66-
95+
6796
steps:
6897
- name: Checkout code
6998
uses: actions/checkout@v3
7099
with:
71-
fetch-depth: 0 # Fetch all tags and history
100+
fetch-depth: 0 # Fetch all tags and history
72101

73102
- name: Download Launch Artifacts
74103
uses: actions/download-artifact@v4

.github/workflows/build_prod_exe.yml

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ permissions:
88
contents: write
99

1010
jobs:
11-
1211
check_release:
13-
if: "! contains(github.event.release.tag_name, '-dev')" # skip if the tag ends with -dev
12+
if: "! contains(github.event.release.tag_name, '-dev')" # skip if the tag ends with -dev
1413
runs-on: ubuntu-latest
1514
steps:
1615
- name: Echo tag
@@ -24,11 +23,43 @@ jobs:
2423
strategy:
2524
matrix:
2625
include:
27-
- { runner: macos-latest, osname: macOS, arch: amd64, target: x86_64-apple-darwin, command: build }
28-
- { runner: macos-latest, osname: macOS, arch: arm64, target: aarch64-apple-darwin, command: build }
29-
- { runner: ubuntu-latest, osname: linux, arch: amd64, target: x86_64-unknown-linux-musl, command: build }
30-
- { runner: ubuntu-latest, osname: linux, arch: arm64, target: aarch64-unknown-linux-musl, command: build, build_args: --no-default-features }
31-
- { runner: windows-latest, osname: windows, arch: amd64, target: x86_64-pc-windows-msvc, command: build, extension: ".exe" }
26+
- {
27+
runner: macos-latest,
28+
osname: macOS,
29+
arch: amd64,
30+
target: x86_64-apple-darwin,
31+
command: build,
32+
}
33+
- {
34+
runner: macos-latest,
35+
osname: macOS,
36+
arch: arm64,
37+
target: aarch64-apple-darwin,
38+
command: build,
39+
}
40+
- {
41+
runner: ubuntu-latest,
42+
osname: linux,
43+
arch: amd64,
44+
target: x86_64-unknown-linux-musl,
45+
command: build,
46+
}
47+
- {
48+
runner: ubuntu-latest,
49+
osname: linux,
50+
arch: arm64,
51+
target: aarch64-unknown-linux-musl,
52+
command: build,
53+
build_args: --no-default-features,
54+
}
55+
- {
56+
runner: windows-latest,
57+
osname: windows,
58+
arch: amd64,
59+
target: x86_64-pc-windows-msvc,
60+
command: build,
61+
extension: ".exe",
62+
}
3263
# - { runner: windows-latest, osname: windows, arch: arm64, target: aarch64-pc-windows-msvc, command: build, extension: ".exe", toolchain: nightly }
3364

3465
steps:
@@ -44,31 +75,29 @@ jobs:
4475
with:
4576
command: ${{ matrix.command }}
4677
target: ${{ matrix.target }}
47-
args: "--locked --release ${{ matrix.build_args }}"
78+
args: "--bin dkn-compute --locked --release ${{ matrix.build_args }}"
4879
strip: true
4980

5081
- name: Prepare Release File
5182
run: |
5283
# move the binary
5384
mv target/${{ matrix.target }}/release/dkn-compute${{ matrix.extension }} ./dkn-compute-binary-${{ matrix.osname }}-${{ matrix.arch }}${{ matrix.extension }}
54-
5585
5686
- name: Upload Launch Artifacts
5787
uses: actions/upload-artifact@v4
5888
with:
5989
name: dkn-compute-binary-${{ matrix.osname }}-${{ matrix.arch }}
6090
path: dkn-compute-binary-${{ matrix.osname }}-${{ matrix.arch }}${{ matrix.extension }}
6191

62-
6392
release:
6493
needs: build
6594
runs-on: ubuntu-latest
66-
95+
6796
steps:
6897
- name: Checkout code
6998
uses: actions/checkout@v3
7099
with:
71-
fetch-depth: 0 # Fetch all tags and history
100+
fetch-depth: 0 # Fetch all tags and history
72101

73102
- name: Download Launch Artifacts
74103
uses: actions/download-artifact@v4

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
resolver = "2"
33
members = ["compute", "p2p", "workflows", "utils", "monitor"]
44

5+
# compute node is the default member, until Oracle comes in
6+
# then, a Launcher will be the default member
7+
default-members = ["compute"]
8+
59
[workspace.package]
610
edition = "2021"
711
version = "0.2.26"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN echo "Target platform: $TARGETPLATFORM"
1818
# build release binary
1919
WORKDIR /usr/src/app
2020
COPY . .
21-
RUN cargo build --release
21+
RUN cargo build --bin dkn-compute --release
2222

2323
# copy release binary to distroless
2424
FROM --platform=$BUILDPLATFORM gcr.io/distroless/cc

0 commit comments

Comments
 (0)