Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoosmanviz committed Jan 1, 2025
1 parent b89a6d6 commit 640a5db
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 41 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
matrix:
nif: ["2.17"]
job:
# - { target: aarch64-apple-darwin, os: macos-15 }
# - { target: x86_64-apple-darwin, os: macos-15 }
- { target: aarch64-apple-darwin, os: macos-15 }
- { target: x86_64-apple-darwin, os: macos-15 }
# - { target: aarch64-unknown-linux-gnu, os: ubuntu-22.04, use-cross: true }
- { target: aarch64-unknown-linux-gnu, os: ubuntu-24.04 }
# - { target: x86_64-unknown-linux-gnu, os: ubuntu-22.04 }
# - { target: aarch64-unknown-linux-gnu, os: ubuntu-24.04 }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-22.04 }

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -79,31 +79,31 @@ jobs:
name: ${{ steps.build-crate.outputs.file-name }}
path: ${{ steps.build-crate.outputs.file-path }}

- name: Build for aarch64
if: ${{ matrix.job.target == 'aarch64-unknown-linux-gnu' }}
run: |
docker build \
--build-arg VERSION=${{ env.PROJECT_VERSION }} \
-f native/kuzu_ex/arm64.Dockerfile \
-t kuzu-builder .
# - name: Build for aarch64
# if: ${{ matrix.job.target == 'aarch64-unknown-linux-gnu' }}
# run: |
# docker build \
# --build-arg VERSION=${{ env.PROJECT_VERSION }} \
# -f native/kuzu_ex/arm64.Dockerfile \
# -t kuzu-builder .

# Create artifacts directory
mkdir -p artifacts
# # Create artifacts directory
# mkdir -p artifacts

# Extract the artifact from the container
container_id=$(docker create kuzu-builder)
docker cp $container_id:/app/native/kuzu_ex/target/aarch64-unknown-linux-gnu/release/libkuzu_ex-v${{ env.PROJECT_VERSION }}-nif-2.17-aarch64-unknown-linux-gnu.so.tar.gz ./artifacts/
docker rm $container_id
# # Extract the artifact from the container
# container_id=$(docker create kuzu-builder)
# docker cp $container_id:/app/native/kuzu_ex/target/aarch64-unknown-linux-gnu/release/libkuzu_ex-v${{ env.PROJECT_VERSION }}-nif-2.17-aarch64-unknown-linux-gnu.so.tar.gz ./artifacts/
# docker rm $container_id

- name: Upload artifact from Docker build
if: ${{ matrix.job.target == 'aarch64-unknown-linux-gnu' }}
uses: actions/upload-artifact@v3
with:
name: libkuzu_ex-v${{ env.PROJECT_VERSION }}-nif-2.17-aarch64-unknown-linux-gnu.so.tar.gz
path: artifacts/libkuzu_ex-v${{ env.PROJECT_VERSION }}-nif-2.17-aarch64-unknown-linux-gnu.so.tar.gz
# - name: Upload artifact from Docker build
# if: ${{ matrix.job.target == 'aarch64-unknown-linux-gnu' }}
# uses: actions/upload-artifact@v3
# with:
# name: libkuzu_ex-v${{ env.PROJECT_VERSION }}-nif-2.17-aarch64-unknown-linux-gnu.so.tar.gz
# path: artifacts/libkuzu_ex-v${{ env.PROJECT_VERSION }}-nif-2.17-aarch64-unknown-linux-gnu.so.tar.gz

- name: Publish archives and packages
if: startsWith(github.ref, 'refs/tags/') && matrix.job.target == 'aarch64-unknown-linux-gnu'
uses: softprops/action-gh-release@v1
with:
files: artifacts/libkuzu_ex-v${{ env.PROJECT_VERSION }}-nif-2.17-aarch64-unknown-linux-gnu.so.tar.gz
# - name: Publish archives and packages
# if: startsWith(github.ref, 'refs/tags/') && matrix.job.target == 'aarch64-unknown-linux-gnu'
# uses: softprops/action-gh-release@v1
# with:
# files: artifacts/libkuzu_ex-v${{ env.PROJECT_VERSION }}-nif-2.17-aarch64-unknown-linux-gnu.so.tar.gz
13 changes: 0 additions & 13 deletions native/kuzu_ex/arm64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,7 @@ ARG VERSION
ENV ARCH=aarch64-unknown-linux-gnu

# Add arm64 architecture and install build dependencies
# RUN dpkg --add-architecture arm64 && \
# apt-get update && \
# apt-get install -y \
# curl \
# build-essential \
# g++-aarch64-linux-gnu \
# gcc-aarch64-linux-gnu \
# libstdc++-12-dev:arm64 \
# cmake \
# pkg-config \
# && rm -rf /var/lib/apt/lists/*
RUN dpkg --add-architecture arm64 && \
sed -i 's/http:\/\/archive.ubuntu.com\/ubuntu\//http:\/\/ports.ubuntu.com\/ubuntu-ports\//g' /etc/apt/sources.list && \
sed -i 's/http:\/\/security.ubuntu.com\/ubuntu\//http:\/\/ports.ubuntu.com\/ubuntu-ports\//g' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y \
curl \
Expand Down

0 comments on commit 640a5db

Please sign in to comment.