mirror of
https://github.com/sadoyan/aralez.git
synced 2026-10-22 21:51:35 +08:00
feat: add compat verions
This commit is contained in:
@@ -21,6 +21,8 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Setup Zig
|
||||||
|
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
|
||||||
- name: Rust toolchain
|
- name: Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1
|
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1
|
||||||
with:
|
with:
|
||||||
@@ -32,15 +34,11 @@ jobs:
|
|||||||
- name: Install Cosign
|
- name: Install Cosign
|
||||||
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
|
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
|
uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
|
||||||
with:
|
with:
|
||||||
platforms: arm64
|
platforms: arm64
|
||||||
- name: Set up docker buildx
|
- name: Set up docker buildx
|
||||||
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
|
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
||||||
with:
|
|
||||||
node-version: 24
|
|
||||||
|
|
||||||
- name: Github registry login
|
- name: Github registry login
|
||||||
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||||
@@ -50,9 +48,11 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
|
timeout-minutes: 60
|
||||||
uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3
|
uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3
|
||||||
with:
|
with:
|
||||||
version: "v2.18.1"
|
version: "v2.18.2"
|
||||||
args: release --clean
|
args: release --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
USERNAME: ${{ github.repository_owner }}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ com_crashlytics_export_strings.xml
|
|||||||
crashlytics.properties
|
crashlytics.properties
|
||||||
crashlytics-build.properties
|
crashlytics-build.properties
|
||||||
/target
|
/target
|
||||||
|
/.zig-cache/
|
||||||
/z_shpo
|
/z_shpo
|
||||||
/configs
|
/configs
|
||||||
Makefile
|
Makefile
|
||||||
|
|||||||
+38
-4
@@ -2,6 +2,10 @@
|
|||||||
version: 2
|
version: 2
|
||||||
project_name: aralez
|
project_name: aralez
|
||||||
|
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
- cargo install --locked cargo-zigbuild
|
||||||
|
|
||||||
dist: target
|
dist: target
|
||||||
builds:
|
builds:
|
||||||
- id: aralez
|
- id: aralez
|
||||||
@@ -24,6 +28,24 @@ builds:
|
|||||||
env:
|
env:
|
||||||
- RUSTFLAGS={{ if eq .Arch "amd64" }}-C target-cpu=x86-64-v3 -C target-feature=+aes,+ssse3{{else}}-C target-cpu=neoverse-n1 -C target-feature=+aes,+sha2,+neon,+crc{{ end }}
|
- RUSTFLAGS={{ if eq .Arch "amd64" }}-C target-cpu=x86-64-v3 -C target-feature=+aes,+ssse3{{else}}-C target-cpu=neoverse-n1 -C target-feature=+aes,+sha2,+neon,+crc{{ end }}
|
||||||
|
|
||||||
|
- id: aralez-compat
|
||||||
|
builder: rust
|
||||||
|
flags:
|
||||||
|
- --release
|
||||||
|
targets:
|
||||||
|
- x86_64-unknown-linux-gnu
|
||||||
|
env:
|
||||||
|
- RUSTFLAGS=-C target-cpu=x86-64
|
||||||
|
|
||||||
|
- id: aralez-compat-musl
|
||||||
|
builder: rust
|
||||||
|
flags:
|
||||||
|
- --release
|
||||||
|
targets:
|
||||||
|
- x86_64-unknown-linux-musl
|
||||||
|
env:
|
||||||
|
- RUSTFLAGS=-C target-cpu=x86-64
|
||||||
|
|
||||||
snapshot:
|
snapshot:
|
||||||
version_template: edge
|
version_template: edge
|
||||||
|
|
||||||
@@ -40,6 +62,18 @@ archives:
|
|||||||
formats: [binary]
|
formats: [binary]
|
||||||
name_template: "{{ .ProjectName }}_{{ .Arch }}-musl"
|
name_template: "{{ .ProjectName }}_{{ .Arch }}-musl"
|
||||||
|
|
||||||
|
- id: aralez-compat
|
||||||
|
ids:
|
||||||
|
- aralez-compat
|
||||||
|
formats: [binary]
|
||||||
|
name_template: "{{ .ProjectName }}_{{ .Arch }}-compat-glibc"
|
||||||
|
|
||||||
|
- id: aralez-compat-musl
|
||||||
|
ids:
|
||||||
|
- aralez-compat-musl
|
||||||
|
formats: [binary]
|
||||||
|
name_template: "{{ .ProjectName }}_{{ .Arch }}-compat-musl"
|
||||||
|
|
||||||
dockers_v2:
|
dockers_v2:
|
||||||
- id: aralez
|
- id: aralez
|
||||||
ids:
|
ids:
|
||||||
@@ -47,8 +81,8 @@ dockers_v2:
|
|||||||
flags:
|
flags:
|
||||||
- --target=release
|
- --target=release
|
||||||
images:
|
images:
|
||||||
- "ghcr.io/sadoyan/{{ .ProjectName }}"
|
- "ghcr.io/{{ .Env.USERNAME }}/{{ .ProjectName }}"
|
||||||
# - "sadoyan/{{ .ProjectName }}"
|
# - "{{ .Env.USERNAME }}/{{ .ProjectName }}"
|
||||||
tags:
|
tags:
|
||||||
- "{{ if not .IsSnapshot }}v{{.Version}}{{ else }}edge{{ end }}"
|
- "{{ if not .IsSnapshot }}v{{.Version}}{{ else }}edge{{ end }}"
|
||||||
platforms:
|
platforms:
|
||||||
@@ -57,12 +91,12 @@ dockers_v2:
|
|||||||
annotations:
|
annotations:
|
||||||
org.opencontainers.image.name: "{{ .ProjectName }}"
|
org.opencontainers.image.name: "{{ .ProjectName }}"
|
||||||
org.opencontainers.image.licenses: "Apache-2.0"
|
org.opencontainers.image.licenses: "Apache-2.0"
|
||||||
org.opencontainers.image.source: "https://github.com/sadoyan/{{ .ProjectName }}"
|
org.opencontainers.image.source: "https://github.com/{{ .Env.USERNAME }}/{{ .ProjectName }}"
|
||||||
org.opencontainers.image.url: "{{ .GitURL }}"
|
org.opencontainers.image.url: "{{ .GitURL }}"
|
||||||
org.opencontainers.image.created: "{{ .Date }}"
|
org.opencontainers.image.created: "{{ .Date }}"
|
||||||
org.opencontainers.image.version: "{{ .Version }}"
|
org.opencontainers.image.version: "{{ .Version }}"
|
||||||
org.opencontainers.image.revision: "{{ .FullCommit }}"
|
org.opencontainers.image.revision: "{{ .FullCommit }}"
|
||||||
io.artifacthub.package.readme-url: "https://raw.githubusercontent.com/sadoyan/{{ .ProjectName }}/main/README.md"
|
io.artifacthub.package.readme-url: "https://raw.githubusercontent.com/{{ .Env.USERNAME }}/{{ .ProjectName }}/main/README.md"
|
||||||
io.artifacthub.package.license: "Apache-2.0"
|
io.artifacthub.package.license: "Apache-2.0"
|
||||||
|
|
||||||
docker_signs:
|
docker_signs:
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
|
USERNAME ?= aralez
|
||||||
TARGET ?= --all-targets
|
TARGET ?= --all-targets
|
||||||
FEATURES ?= --all-features
|
FEATURES ?= --all-features
|
||||||
|
|
||||||
@@ -60,3 +61,8 @@ fix-all:
|
|||||||
cargo clippy --workspace $(TARGET) $(FEATURES) --fix
|
cargo clippy --workspace $(TARGET) $(FEATURES) --fix
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
|
.PHONY: docker-build
|
||||||
|
docker-build: ## Build project in Docker
|
||||||
|
docker build --target=builder -t builder .
|
||||||
|
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}:/src -e USERNAME=${USERNAME} -w /src -ti builder:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user