diff --git a/.github/workflows/test_build_docker_indexify_server_workflow.yaml b/.github/workflows/test_build_docker_indexify_server_workflow.yaml new file mode 100644 index 000000000..85dbd5b06 --- /dev/null +++ b/.github/workflows/test_build_docker_indexify_server_workflow.yaml @@ -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 \ No newline at end of file diff --git a/server/Cross.toml b/server/Cross.toml index 98795d375..f2edef017 100644 --- a/server/Cross.toml +++ b/server/Cross.toml @@ -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" ]