-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(CI): testing releasing building on PRs #1114
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
.github/workflows/wf_build_indexify_server_release_packages.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Build Indexify Server Release Packages | ||
|
||
on: | ||
workflow_call: | ||
|
||
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 | ||
|
||
# build-macos-package-x86: | ||
# name: Build macOS Package | ||
# runs-on: macos-12 | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - run: rustup update | ||
# - run: rustup toolchain install nightly --component rustfmt | ||
# - run: cargo +nightly fmt --check | ||
# - run: make package-ui | ||
# - run: cargo build --release | ||
# - uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: indexify-server-darwin-amd64 | ||
# path: server/target/release/indexify-server | ||
# if-no-files-found: error | ||
|
||
# build-windows-package: | ||
# name: Build Windows Package | ||
# runs-on: windows-latest-large | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: ilammy/setup-nasm@v1 | ||
# - run: rustup toolchain install nightly --component rustfmt | ||
# - run: cargo +nightly fmt --check | ||
# - run: make package-ui | ||
# - run: cargo build --release | ||
# - uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: indexify-server-windows-amd64.exe | ||
# path: server/target/release/indexify-server.exe | ||
# if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
[target.aarch64-unknown-linux-gnu] | ||
dockerfile = "dockerfiles/Dockerfile.builder_linux_aarch64" | ||
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" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
FROM --platform=linux/arm64/v8 python:3.11 AS python | ||
FROM ubuntu:24.04 | ||
|
||
FROM ubuntu:22.04 | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update && \ | ||
apt-get install --assume-yes --no-install-recommends \ | ||
ca-certificates \ | ||
build-essential pkg-config clang \ | ||
g++-aarch64-linux-gnu libc6-dev-arm64-cross \ | ||
git curl | ||
|
||
RUN apt-get update && apt-get install --assume-yes --no-install-recommends \ | ||
g++-aarch64-linux-gnu \ | ||
libc6-dev-arm64-cross git clang | ||
RUN curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh && \ | ||
bash -E nodesource_setup.sh && \ | ||
apt-get install --assume-yes --no-install-recommends nodejs | ||
|
||
ENV CROSS_TOOLCHAIN_PREFIX=aarch64-linux-gnu- | ||
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \ | ||
AR_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"ar \ | ||
CC_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"gcc \ | ||
CXX_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"g++ \ | ||
RUST_TEST_THREADS=1 \ | ||
PKG_CONFIG_PATH="/usr/lib/aarch64-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}" | ||
|
||
RUN apt install -y python3.11 python3.11-dev | ||
|
||
COPY --from=python /usr/local/lib/ /opt/sysroot/usr/lib/ | ||
|
||
ENV RUSTFLAGS="-L /opt/sysroot/usr/lib" | ||
PKG_CONFIG_PATH="/usr/lib/aarch64-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,12 @@ | ||
FROM ubuntu:20.04 | ||
#LABEL stage=builder | ||
|
||
WORKDIR /indexify-build | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update | ||
RUN apt -y install software-properties-common unzip \ | ||
build-essential make cmake ca-certificates \ | ||
curl pkg-config git \ | ||
sqlite3 clang gcc-10 g++-10 | ||
|
||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y | ||
|
||
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-25.1-linux-x86_64.zip | ||
|
||
RUN unzip protoc-25.1-linux-x86_64.zip -d /usr/local | ||
|
||
ENV PATH="/${HOME}/.cargo/bin:/{HOME}/.local/bin:${PATH}" | ||
|
||
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse | ||
|
||
RUN curl -sL https://deb.nodesource.com/setup_22.x | bash | ||
|
||
RUN apt install -y nodejs | ||
|
||
RUN apt remove -y gcc-9 g++-9 | ||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 20 --slave /usr/bin/g++ g++ /usr/bin/g++-10 | ||
FROM ubuntu:24.04 | ||
|
||
RUN apt-get update && \ | ||
apt-get install --assume-yes --no-install-recommends \ | ||
ca-certificates \ | ||
build-essential pkg-config clang \ | ||
g++ \ | ||
git curl | ||
|
||
RUN curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh && \ | ||
bash -E nodesource_setup.sh && \ | ||
apt-get install --assume-yes --no-install-recommends nodejs |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like some pure magic. Is this Ubuntu specific uid, gid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like that. For some reason this started breaking for Ubuntu 20 and 22.
That is the part, I can't explain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)