mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-08-20 11:00:00 +00:00
Compare commits
10 Commits
69fd368099
...
faa8bfffa7
Author | SHA1 | Date | |
---|---|---|---|
![]() |
faa8bfffa7 | ||
d81da1786d | |||
![]() |
8876379443 | ||
![]() |
4fe81b7a26 | ||
![]() |
aca1e1381f | ||
![]() |
6d0430e5ed | ||
d2c2ebca0f | |||
f5f3f2c100 | |||
9fcb1ea2cf | |||
![]() |
623303cf72 |
30
.github/runner/Dockerfile
vendored
Normal file
30
.github/runner/Dockerfile
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
FROM ubuntu:latest
|
||||||
|
|
||||||
|
ARG RUNNER_VERSION="2.323.0"
|
||||||
|
|
||||||
|
# Prevents installdependencies.sh from prompting the user and blocking the image creation
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt update -y && apt upgrade -y && useradd -m docker
|
||||||
|
RUN apt install -y --no-install-recommends \
|
||||||
|
curl jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip \
|
||||||
|
# dot net core dependencies
|
||||||
|
libicu74 libssl3 libkrb5-3 zlib1g libcurl4
|
||||||
|
|
||||||
|
|
||||||
|
RUN cd /home/docker && mkdir actions-runner && cd actions-runner \
|
||||||
|
&& curl -O -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \
|
||||||
|
&& tar xzf ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz
|
||||||
|
|
||||||
|
RUN chown -R docker ~docker && /home/docker/actions-runner/bin/installdependencies.sh
|
||||||
|
|
||||||
|
COPY start.sh start.sh
|
||||||
|
|
||||||
|
# make the script executable
|
||||||
|
RUN chmod +x start.sh
|
||||||
|
|
||||||
|
# since the config and run script for actions are not allowed to be run by root,
|
||||||
|
# set the user to "docker" so all subsequent commands are run as the docker user
|
||||||
|
USER docker
|
||||||
|
|
||||||
|
ENTRYPOINT ["./start.sh"]
|
17
.github/runner/docker-compose.yml
vendored
Normal file
17
.github/runner/docker-compose.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# docker-compose.yml
|
||||||
|
|
||||||
|
services:
|
||||||
|
github-runner:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
RUNNER_VERSION: 2.323.0
|
||||||
|
container_name: github-runner
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
volumes:
|
||||||
|
- runner-work:/home/runner/actions-runner/_work
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
runner-work:
|
9
.github/runner/example.env
vendored
Normal file
9
.github/runner/example.env
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# Repository name
|
||||||
|
REPO="Magnus167/rustframe"
|
||||||
|
|
||||||
|
# GitHub runner token
|
||||||
|
GH_TOKEN="some_token_here"
|
||||||
|
|
||||||
|
# Labels for the runner
|
||||||
|
RUNNER_LABELS=self-hosted-linux,linux
|
24
.github/runner/start.sh
vendored
Normal file
24
.github/runner/start.sh
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
REPOSITORY=$REPO
|
||||||
|
ACCESS_TOKEN=$GH_TOKEN
|
||||||
|
LABELS=$RUNNER_LABELS
|
||||||
|
|
||||||
|
# echo "REPO ${REPOSITORY}"
|
||||||
|
# echo "ACCESS_TOKEN ${ACCESS_TOKEN}"
|
||||||
|
|
||||||
|
REG_TOKEN=$(curl -X POST -H "Authorization: token ${ACCESS_TOKEN}" -H "Accept: application/vnd.github+json" https://api.github.com/repos/${REPOSITORY}/actions/runners/registration-token | jq .token --raw-output)
|
||||||
|
|
||||||
|
cd /home/docker/actions-runner
|
||||||
|
|
||||||
|
./config.sh --url https://github.com/${REPOSITORY} --token ${REG_TOKEN} --labels ${LABELS}
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
echo "Removing runner..."
|
||||||
|
./config.sh remove --unattended --token ${REG_TOKEN}
|
||||||
|
}
|
||||||
|
|
||||||
|
trap 'cleanup; exit 130' INT
|
||||||
|
trap 'cleanup; exit 143' TERM
|
||||||
|
|
||||||
|
./run.sh & wait $!
|
29
.github/workflows/run-benchmarks-self-hosted.yml
vendored
Normal file
29
.github/workflows/run-benchmarks-self-hosted.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: Run benchmarks
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-benchmarks:
|
||||||
|
runs-on: self-hosted-linux
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: Run benchmarks
|
||||||
|
run: cargo bench
|
||||||
|
|
||||||
|
- name: Upload benchmark reports
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: benchmark-reports-${{ github.sha }}
|
||||||
|
path: ./target/criterion/
|
6
.github/workflows/run-benchmarks.yml
vendored
6
.github/workflows/run-benchmarks.yml
vendored
@ -2,9 +2,9 @@ name: Run benchmarks
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
# push:
|
||||||
branches:
|
# branches:
|
||||||
- main
|
# - main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-benchmarks:
|
run-benchmarks:
|
||||||
|
@ -25,6 +25,12 @@ Rustframe keeps things simple, safe, and readable. It is handy for quick numeric
|
|||||||
- **Date‑centric row index** - business‑day ranges and calendar slicing built in.
|
- **Date‑centric row index** - business‑day ranges and calendar slicing built in.
|
||||||
- **Pure safe Rust** - 100 % safe, zero `unsafe`.
|
- **Pure safe Rust** - 100 % safe, zero `unsafe`.
|
||||||
|
|
||||||
|
### Coming soon
|
||||||
|
|
||||||
|
- **CSV I/O** - read/write CSV files with a simple API.
|
||||||
|
- **Date Utils** - date math, calendar slicing, indexing, and more.
|
||||||
|
- **More math** - more math functions and aggregations.
|
||||||
|
|
||||||
### Heads up
|
### Heads up
|
||||||
|
|
||||||
- **Not memory‑efficient (yet)** - footprint needs work.
|
- **Not memory‑efficient (yet)** - footprint needs work.
|
||||||
@ -34,6 +40,7 @@ Rustframe keeps things simple, safe, and readable. It is handy for quick numeric
|
|||||||
|
|
||||||
- Optional GPU help (Vulkan or similar) for heavier workloads.
|
- Optional GPU help (Vulkan or similar) for heavier workloads.
|
||||||
- Straightforward Python bindings using `pyo3`.
|
- Straightforward Python bindings using `pyo3`.
|
||||||
|
- Integration with common ML libraries, or introduce simple ML features.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user