Skip to content

Commit

Permalink
fix(CI): fix publishing workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
seriousben committed Dec 18, 2024
1 parent c0783d2 commit 0fcbc9d
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 2 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/test_build_docker_indexify_server_workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Test - Build Docker Indexify Server

on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
paths:
- 'server/**'
- '.github/workflows/test_build_docker_indexify_server_workflow.yaml'

env:
CARGO_TERM_COLOR: always

defaults:
run:
working-directory: ./server

jobs:
build-linux-amd64-package:
name: Build x86_64 Linux Package
runs-on: ubuntu-latest-xlarge
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install nightly --component rustfmt
- run: cargo +nightly fmt --check
- run: cargo install cargo-deb
- run: make build-release
- run: cargo deb --no-build --no-strip --target x86_64-unknown-linux-gnu
- uses: actions/upload-artifact@v4
with:
name: indexify-server-linux-amd64
path: server/target/x86_64-unknown-linux-gnu/release/indexify-server
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: indexify-server-deb-linux-amd64
path: server/target/x86_64-unknown-linux-gnu/debian/indexify-server_*.deb
if-no-files-found: error

build-linux-arm64-package:
name: Build Aarch64 Linux Package
runs-on: ubuntu-latest-xlarge
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install nightly --component rustfmt
- run: cargo +nightly fmt --check
- run: make build-release-aarch64
- run: cargo install cargo-deb
- run: cargo deb --no-build --no-strip --target aarch64-unknown-linux-gnu
- uses: actions/upload-artifact@v4
with:
name: indexify-server-linux-aarch64
path: server/target/aarch64-unknown-linux-gnu/release/indexify-server
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: indexify-server-deb-linux-aarch64
path: server/target/aarch64-unknown-linux-gnu/debian/indexify-server_*.deb
if-no-files-found: error

build-macos-package:
name: Build macOS Package
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v4
- run: rustup update
- run: rustup toolchain install nightly --component rustfmt
- run: rustup target add aarch64-apple-darwin
- run: cargo +nightly fmt --check
- run: make package-ui
- run: cargo build --release
- uses: actions/upload-artifact@v4
with:
name: indexify-server-darwin-arm64
path: server/target/release/indexify-server
if-no-files-found: error
4 changes: 2 additions & 2 deletions server/Cross.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ pre-build = [
"apt-get update && apt-get install --assume-yes build-essential npm curl protobuf-compiler",
"dpkg --add-architecture $CROSS_DEB_ARCH",
"mkdir -p /.npm",
"chown -R 1000:1000 /.npm"
"chown -R 1001:128 /.npm"
]

[target.x86_64-unknown-linux-gnu]
dockerfile = "dockerfiles/Dockerfile.builder_linux_x86"
pre-build = [
"mkdir -p /.npm",
"chown -R 1000:1000 /.npm"
"chown -R 1001:128 /.npm"
]

0 comments on commit 0fcbc9d

Please sign in to comment.