-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to fix the CI but idk (#1430)
* add musl to linux install * github workflows * added rustls
- Loading branch information
Showing
4 changed files
with
142 additions
and
103 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -20,12 +20,12 @@ jobs: | |
matrix: | ||
target: [x86_64, aarch64] | ||
steps: | ||
- name: "Check if user has write access" | ||
uses: "lannonbr/[email protected]" | ||
with: | ||
permission: "write" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: "Check if user has write access" | ||
# uses: "lannonbr/[email protected]" | ||
# with: | ||
# permission: "write" | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up cargo cache | ||
uses: actions/cache@v3 | ||
continue-on-error: false | ||
|
@@ -54,29 +54,29 @@ jobs: | |
command: build | ||
target: ${{ matrix.target }} | ||
args: --release --out dist -i python3.7 -i python3.8 -i python3.9 -i python3.10 -i python3.11 | ||
manylinux: 2014 | ||
manylinux: auto | ||
before-script-linux: | | ||
if [[ -f /etc/os-release ]]; then | ||
. /etc/os-release | ||
case $ID in | ||
ubuntu) | ||
echo "Installing openssl-dev on Ubuntu..." | ||
apt update -y | ||
apt install -y pkg-config libssl-dev libc6 build-essential | ||
apt install -y pkg-config libssl-dev libc6 build-essential musl-tools | ||
;; | ||
arch) | ||
echo "Installing openssl-dev on Arch Linux..." | ||
pacman -Syu --noconfirm pkg-config openssl | ||
pacman -Syu --noconfirm pkg-config openssl musl | ||
;; | ||
fedora) | ||
echo "Installing openssl-dev on Fedora..." | ||
dnf update -y | ||
dnf install -y pkg-config openssl-devel | ||
dnf install -y pkg-config openssl-devel musl | ||
;; | ||
alpine) | ||
echo "Installing openssl-dev on Alpine Linux..." | ||
apk update -y | ||
apk add pkgconfig openssl-dev | ||
apk add pkgconfig openssl-dev musl-dev | ||
;; | ||
centos) | ||
echo "Installing openssl-dev on CentOS..." | ||
|
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,97 +1,97 @@ | ||
# name: Code Coverage | ||
name: Code Coverage | ||
# on: | ||
# workflow_call: | ||
# inputs: | ||
# skip_tests: | ||
# type: boolean | ||
# default: false | ||
# required: false | ||
# # DO NOT CHANGE NAME OF WORKFLOW, USED IN OTHER WORKFLOWS KEEP "Rust Tests" | ||
# jobs: | ||
# code-coverage: | ||
# if: ${{ !inputs.skip_tests }} | ||
# name: Code Coverage | ||
# runs-on: ubuntu-latest | ||
# env: | ||
# RUSTC_WRAPPER: sccache | ||
# SCCACHE_CACHE_SIZE: 2G | ||
# SCCACHE_DIR: /home/runner/.cache/sccache | ||
# SCCACHE_PATH: /home/runner/.cache/sccache | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# name: Checkout | ||
# - name: Cache sccache | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: /home/runner/.cache/sccache | ||
# key: codecov-${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }} | ||
# restore-keys: | | ||
# codecov-${{ runner.os }}-sccache- | ||
# - name: Set up cargo cache | ||
# uses: actions/cache@v3 | ||
# continue-on-error: false | ||
# with: | ||
# path: | | ||
# ~/.cargo/bin/ | ||
# ~/.cargo/registry/index/ | ||
# ~/.cargo/registry/cache/ | ||
# ~/.cargo/git/db/ | ||
# target/debug | ||
# target/release | ||
# key: codecov-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-coverage | ||
# restore-keys: codecov-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-coverage | ||
# - uses: actions-rs/toolchain@v1 | ||
# name: Setup Rust | ||
# with: | ||
# toolchain: nightly | ||
# override: true | ||
# components: rustfmt, clippy | ||
# - name: Install sccache (Ubuntu) | ||
# run: | | ||
# curl -L https://github.com/mozilla/sccache/releases/download/v0.5.4/sccache-v0.5.4-x86_64-unknown-linux-musl.tar.gz | tar xz | ||
# sudo mv sccache-v0.5.4-x86_64-unknown-linux-musl/sccache /usr/local/bin/ | ||
# - name: Start sccache server | ||
# run: sccache --start-server | ||
# - name: Setup Python | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: "3.10" | ||
# cache: 'pip' | ||
# - name: Run Maturin develop | ||
# uses: PyO3/maturin-action@v1 | ||
# with: | ||
# working-directory: ./python | ||
# command: build | ||
# sccache: true | ||
# - name: Install Python dependencies | ||
# run: | | ||
# python -m pip install -q pytest networkx numpy seaborn pandas nbmake pytest-xdist matplotlib pyvis pytest-cov coverage | ||
# python -m pip install target/wheels/raphtory-*.whl | ||
# - name: Run tests (rust) | ||
# run: cargo test -p raphtory --features "io python" | ||
# env: | ||
# CARGO_INCREMENTAL: '0' | ||
# RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
# RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
# - name: Run tests (python) | ||
# run: cargo test -p raphtory-pymodule --no-default-features | ||
# env: | ||
# CARGO_INCREMENTAL: '0' | ||
# RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
# RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
# - id: coveragerust | ||
# name: Run rust tests (rust-grcov) and collect coverage | ||
# uses: actions-rs/[email protected] | ||
# - name: Run python tests and collect coverage | ||
# run: cd python/tests && pytest --cov=./ --cov-report=xml | ||
# - name: Codecov | ||
# uses: codecov/[email protected] | ||
# with: | ||
# verbose: true | ||
# fail_ci_if_error: false | ||
# files: ./coverage.xml, ${{ steps.coveragerust.outputs.report }} | ||
# - name: Print sccache stats | ||
# run: sccache --show-stats | ||
# - name: Stop sccache server | ||
# run: sccache --stop-server || true | ||
# DO NOT CHANGE NAME OF WORKFLOW, USED IN OTHER WORKFLOWS KEEP "Rust Tests" | ||
jobs: | ||
code-coverage: | ||
if: ${{ !inputs.skip_tests }} | ||
name: Code Coverage | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTC_WRAPPER: sccache | ||
SCCACHE_CACHE_SIZE: 2G | ||
SCCACHE_DIR: /home/runner/.cache/sccache | ||
SCCACHE_PATH: /home/runner/.cache/sccache | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Checkout | ||
- name: Cache sccache | ||
uses: actions/cache@v3 | ||
with: | ||
path: /home/runner/.cache/sccache | ||
key: codecov-${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
codecov-${{ runner.os }}-sccache- | ||
- name: Set up cargo cache | ||
uses: actions/cache@v3 | ||
continue-on-error: false | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/debug | ||
target/release | ||
key: codecov-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-coverage | ||
restore-keys: codecov-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-coverage | ||
- uses: actions-rs/toolchain@v1 | ||
name: Setup Rust | ||
with: | ||
toolchain: nightly | ||
override: true | ||
components: rustfmt, clippy | ||
- name: Install sccache (Ubuntu) | ||
run: | | ||
curl -L https://github.com/mozilla/sccache/releases/download/v0.5.4/sccache-v0.5.4-x86_64-unknown-linux-musl.tar.gz | tar xz | ||
sudo mv sccache-v0.5.4-x86_64-unknown-linux-musl/sccache /usr/local/bin/ | ||
- name: Start sccache server | ||
run: sccache --start-server | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: 'pip' | ||
- name: Run Maturin develop | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
working-directory: ./python | ||
command: build | ||
sccache: true | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install -q pytest networkx numpy seaborn pandas nbmake pytest-xdist matplotlib pyvis pytest-cov coverage | ||
python -m pip install target/wheels/raphtory-*.whl | ||
- name: Run tests (rust) | ||
run: cargo test -p raphtory --features "io python" | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
- name: Run tests (python) | ||
run: cargo test -p raphtory-pymodule --no-default-features | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
- id: coveragerust | ||
name: Run rust tests (rust-grcov) and collect coverage | ||
uses: actions-rs/[email protected] | ||
- name: Run python tests and collect coverage | ||
run: cd python/tests && pytest --cov=./ --cov-report=xml | ||
- name: Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
verbose: true | ||
fail_ci_if_error: false | ||
files: ./coverage.xml, ${{ steps.coveragerust.outputs.report }} | ||
- name: Print sccache stats | ||
run: sccache --show-stats | ||
- name: Stop sccache server | ||
run: sccache --stop-server || true | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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