Skip to content

Commit

Permalink
Merge 5cec424 into 66c9362
Browse files Browse the repository at this point in the history
  • Loading branch information
oluiscabral authored Dec 12, 2024
2 parents 66c9362 + 5cec424 commit 3b7ea9d
Show file tree
Hide file tree
Showing 16 changed files with 361 additions and 127 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
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release

on:
push:
tags:
- "*"

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: 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:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
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
21 changes: 21 additions & 0 deletions java/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
buildscript {
repositories {
google()
gradlePluginPortal()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath libs.gradle
classpath libs.rust.android
classpath libs.axion.release.plugin
}
}

allprojects {
repositories {
google()
gradlePluginPortal()
maven { url "https://jitpack.io" }
maven { url "https://plugins.gradle.org/m2/" }
}
}
18 changes: 9 additions & 9 deletions java/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
commons-math3 = "3.6.1"
guava = "33.0.0-jre"
junit-jupiter = "5.10.2"
gradle = "8.7.3"
rustAndroid = "0.9.4"
junitJupiterApi = "5.11.3"
axionReleasePlugin = "1.17.0"

[libraries]
commons-math3 = { module = "org.apache.commons:commons-math3", version.ref = "commons-math3" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
rust-android = { module = "org.mozilla.rust-android-gradle:plugin", version.ref = "rustAndroid" }
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junitJupiterApi" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junitJupiterApi" }
axion-release-plugin = { module = "pl.allegro.tech.build:axion-release-plugin", version.ref = "axionReleasePlugin" }
Loading

0 comments on commit 3b7ea9d

Please sign in to comment.