Skip to content

Commit

Permalink
Merge branch 'daniel/c-musl-x86'
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Aug 12, 2024
2 parents 037e81d + 685559c commit 056b88c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 34 deletions.
40 changes: 18 additions & 22 deletions .github/workflows/build-c-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,34 +47,30 @@ jobs:
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Install cross-compilation tools for aarch64-musl
if: matrix.settings.target == 'aarch64-unknown-linux-musl'
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
wget https://musl.cc/aarch64-linux-musl-cross.tgz
tar -xzf aarch64-linux-musl-cross.tgz
echo "$PWD/aarch64-linux-musl-cross/bin" >> $GITHUB_PATH
- uses: goto-bus-stop/setup-zig@7ab2955eb728f5440978d5824358023be3a2802d # v2.2.0
if: ${{ contains(matrix.settings.target, 'musl') }}
with:
version: 0.12.0

- name: Install cross-compilation tools for x86_64-musl
if: matrix.settings.target == 'x86_64-unknown-linux-musl'
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
- name: Install Zigbuild
if: ${{ contains(matrix.settings.target, 'musl') }}
run: cargo install cargo-zigbuild --locked --git https://github.com/rust-cross/cargo-zigbuild --rev 6f7e1336c9cd13cf1b3704f93c40fcf84caaed6b # 0.18.4

- name: Build Rust (GNU/Others)
if: ${{ !endsWith(matrix.settings.target, '-linux-musl') }}
- name: Add build architecture
run: rustup target add ${{ matrix.settings.target }}

- name: Build Rust for MUSL - ${{ matrix.settings.target }}
if: ${{ contains(matrix.settings.target, 'musl') }}
env:
RUSTFLAGS: "-D warnings"
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
run: cargo build --target ${{ matrix.settings.target }} --release --workspace --exclude infisical-py
RUSTFLAGS: "-D warnings -C target-feature=-crt-static"
run: cargo zigbuild -p infisical-c --target ${{ matrix.settings.target }} --release

- name: Build Rust (Musl)
if: endsWith(matrix.settings.target, '-linux-musl')
- name: Build Rust for Non-MUSL - ${{ matrix.settings.target }}
if: ${{ !contains(matrix.settings.target, 'musl') }}
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
RUSTFLAGS: "-D warnings -C target-feature=-crt-static"
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-musl-gcc
run: cargo build --target ${{ matrix.settings.target }} --release --workspace --exclude infisical-py
run: cargo build -p infisical-c --target ${{ matrix.settings.target }} --release

- name: Upload Artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/release-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ run-name: Release Java SDK

on:
push:
tags:
- "*.*.*" # version, e.g. 1.0.0
# tags:
# - "*.*.*" # version, e.g. 1.0.0

jobs:
generate_schemas:
Expand Down Expand Up @@ -111,13 +111,13 @@ jobs:
echo "Listing files in languages/java/src/main/resources:"
ls -R languages/java/src/main/resources
- name: Publish Maven
working-directory: languages/java
run: |
./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYID }} # Last 8 characters of the full key ID
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
# - name: Publish Maven
# working-directory: languages/java
# run: |
# ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
# env:
# ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
# ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
# ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
# ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYID }} # Last 8 characters of the full key ID
# ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}

0 comments on commit 056b88c

Please sign in to comment.