diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..72a1182 --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,41 @@ +name: Release on main branches +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + os: [ubuntu-20.04] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Update system + run: | + apt-get update -qy + + - name: Install dependencies + run: | + apt-get install -y curl gcc git + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > ./rustup.sh + chmod +x rustup.sh + ./rustup.sh -y + + - name: Build release + run: | + . "$HOME/.cargo/env" + cargo build --release + +# publish: +# image: woodpeckerci/plugin-release +# settings: +# files: +# - '' +# api_key: +# from_secret: ACCESS_TOKEN diff --git a/Cargo.toml b/Cargo.toml index 8dc6cb4..a1cfcdd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,3 +4,19 @@ version = "0.1.0" edition = "2024" [dependencies] + +[lib] +name = "tm_interpreter" +crate-type = ["staticlib"] + +[profile.release] +opt-level = "z" +lto = true + +# x86_64 (glibc, statisch) +[target.x86_64-unknown-linux-gnu] +rustflags = ["-C", "target-feature=+crt-static"] + +# aarch64 (arm64, statisch) +[target.aarch64-unknown-linux-gnu] +rustflags = ["-C", "target-feature=+crt-static"]