Skip to content

Commit

Permalink
Merge 78d058d into 66c9362
Browse files Browse the repository at this point in the history
  • Loading branch information
oluiscabral authored Dec 14, 2024
2 parents 66c9362 + 78d058d commit 6cb015b
Show file tree
Hide file tree
Showing 16 changed files with 343 additions and 128 deletions.
62 changes: 45 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,11 @@ jobs:

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly # nightly is required for fmt
components: rustfmt, clippy

- name: Check
run: cargo check

- name: Format
run: |
cargo fmt --all -- --check
cargo clippy --workspace --bins -- -D warnings
- name: Build Debug
run: cargo build --verbose
- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
with:
save-if: false

- name: Run tests
run: cargo test --verbose
Expand All @@ -54,6 +45,15 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3

- name: Set up Android SDK
uses: android-actions/setup-android@v3

- name: Set up Android NDK
uses: nttld/setup-ndk@v1
with:
link-to-sdk: true
ndk-version: r28-beta1

- name: Java tests
run: gradle test
working-directory: ./java
Expand All @@ -68,12 +68,17 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Build Release
run: cargo build --verbose --release
- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
with:
save-if: false

- name: Run tests
run: cargo test --workspace --verbose

- name: Build Release
run: cargo build --verbose --release

- name: Run `ark-cli watch` test
run: ./integration/ark-cli-watch.sh

Expand All @@ -86,6 +91,15 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3

- name: Set up Android SDK
uses: android-actions/setup-android@v3

- name: Set up Android NDK
uses: nttld/setup-ndk@v1
with:
link-to-sdk: true
ndk-version: r28-beta1

- name: Java tests
run: gradle test
working-directory: ./java
Expand All @@ -100,12 +114,17 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Build Release
run: cargo build --verbose --release
- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
with:
save-if: false

- name: Run tests
run: cargo test --workspace --verbose

- name: Build Release
run: cargo build --verbose --release

- name: Run `ark-cli watch` test
run: ./integration/ark-cli-watch.sh

Expand All @@ -118,6 +137,15 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3

- name: Set up Android SDK
uses: android-actions/setup-android@v3

- name: Set up Android NDK
uses: nttld/setup-ndk@v1
with:
link-to-sdk: true
ndk-version: r28-beta1

- name: Java tests
run: gradle test
working-directory: ./java
82 changes: 82 additions & 0 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Cache build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
linux:
name: Linux
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
with:
save-if: true

- name: Run tests
run: cargo test --workspace --verbose --release

windows:
name: Windows
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
with:
save-if: true

- name: Run tests
run: cargo test --workspace --verbose --release

mac-intel:
name: MacOS Intel
runs-on: macos-14

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
with:
save-if: true

- name: Run tests
run: cargo test --workspace --verbose --release

mac-arm:
name: MacOS ARM
runs-on: macos-13-xlarge

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
with:
save-if: true

- name: Run tests
run: cargo test --workspace --verbose --release
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release

on:
push:
tags:
- "*"

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
with:
save-if: false

- name: Run tests
run: cargo test --workspace --verbose

- name: Install JDK
uses: actions/[email protected]
with:
distribution: "temurin"
java-version: "22"

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3

- name: Set up Android SDK
uses: android-actions/setup-android@v3

- name: Set up Android NDK
uses: nttld/setup-ndk@v1
with:
link-to-sdk: true
ndk-version: r28-beta1

- name: Java tests
run: gradle test
working-directory: ./java

- name: Publish Java release
run: gradle publish
working-directory: ./java
env:
RELEASE_VERSION: ${{ github.ref_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
with:
save-if: true

- name: Run tests
run: cargo test --workspace --verbose --release

Expand All @@ -32,6 +37,11 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
with:
save-if: true

- name: Run tests
run: cargo test --workspace --verbose --release

Expand All @@ -45,6 +55,11 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
with:
save-if: true

- name: Run tests
run: cargo test --workspace --verbose --release

Expand All @@ -58,5 +73,10 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
with:
save-if: true

- name: Run tests
run: cargo test --workspace --verbose --release
27 changes: 0 additions & 27 deletions ark-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,5 @@
# Ark-CLI

### Installation

To compile you will need openssl libraries and headers:

```shell
# macOS (Homebrew)
$ brew install openssl@3

# macOS (MacPorts)
$ sudo port install openssl

# macOS (pkgsrc)
$ sudo pkgin install openssl

# Arch Linux
$ sudo pacman -S pkg-config openssl

# Debian and Ubuntu
$ sudo apt-get install pkg-config libssl-dev

# Fedora
$ sudo dnf install pkg-config perl-FindBin openssl-devel

# Alpine Linux
$ apk add pkgconfig openssl-dev
```

### Usage

```shell
Expand Down
2 changes: 1 addition & 1 deletion data-error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bench = false

[dependencies]
thiserror = "1"
reqwest = "0.11.11"
reqwest = { version = "0.11.11", features = [ "json", "rustls-tls" ], default-features = false }
serde_json = "1.0.82"
anyhow = "1"
url = { version = "2.2.2", features = ["serde"] }
2 changes: 1 addition & 1 deletion data-link/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ log = { version = "0.4.17", features = ["release_max_level_off"] }
serde_json = "1.0.82"
serde = { version = "1.0.138", features = ["derive"] }
url = { version = "2.2.2", features = ["serde"] }
reqwest = "0.11.11"
reqwest = { version = "0.11.11", features = [ "json", "rustls-tls" ], default-features = false }
scraper = "0.13.0"
tokio = { version = "1", features = ["full"] }

Expand Down
3 changes: 2 additions & 1 deletion java/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Ignore Gradle project-specific cache directory
.gradle
.local.properties

# Ignore Gradle build output directory
build
*.log
*.log
20 changes: 20 additions & 0 deletions java/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
buildscript {
repositories {
google()
gradlePluginPortal()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath libs.gradle
classpath libs.rust.android
}
}

allprojects {
repositories {
google()
gradlePluginPortal()
maven { url "https://jitpack.io" }
maven { url "https://plugins.gradle.org/m2/" }
}
}
Loading

0 comments on commit 6cb015b

Please sign in to comment.