Skip to content

Commit

Permalink
ci: add aarch64-unknown-linux-gnu target
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Feb 28, 2024
1 parent 424dcc3 commit 76e6d6d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .fluentci/src/dagger/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,25 @@ export const build = async (src = ".") => {
"build-essential",
"libasound2-dev",
"protobuf-compiler",
"gcc-aarch64-linux-gnu",
])
.withDirectory("/app", context, { exclude })
.withWorkdir("/app")
.withMountedCache("/app/target", client.cacheVolume("target"))
.withMountedCache("/root/cargo/registry", client.cacheVolume("registry"))
.withMountedCache("/assets", client.cacheVolume("gh-release-assets"))
.withEnvVariable(
"CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER",
Deno.env.get("TARGET") === "aarch64-unknown-linux-gnu"
? "aarch64-linux-gnu-gcc"
: ""
)
.withEnvVariable("TAG", Deno.env.get("TAG") || "latest")
.withEnvVariable(
"TARGET",
Deno.env.get("TARGET") || "x86_64-unknown-linux-gnu"
)
.withExec(["sh", "-c", "rustup target add $TARGET"])
.withExec(["sh", "-c", "cargo build --release --target $TARGET"])
.withExec([
"sh",
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
extensions: tar.gz tar.gz.sha256
target:
- aarch64-unknown-linux-gnu
- x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v3
- uses: fluentci-io/setup-fluentci@v4
Expand All @@ -22,8 +22,11 @@ jobs:
TAG: ${{ env.RELEASE_VERSION }}
TARGET: ${{ matrix.target }}
- name: Upload release assets
run: fluentci run github_pipeline release_upload
run: |
for ext in tar.gz tar.gz.sha256; do
export FILE=/assets/tunein_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.$ext
fluentci run github_pipeline release_upload
done
env:
TAG: ${{ env.RELEASE_VERSION }}
FILE: /assets/tunein_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.${{ matrix.extensions }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 76e6d6d

Please sign in to comment.