Add publish to pipeline.
Update deployment docs. Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
5
.github/workflows/bake.yml
vendored
5
.github/workflows/bake.yml
vendored
@@ -72,7 +72,10 @@ jobs:
|
|||||||
machine: ${{fromJSON(inputs.machines)}}
|
machine: ${{fromJSON(inputs.machines)}}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Bake
|
- name: Bake
|
||||||
env:
|
env:
|
||||||
bake_target: ${{matrix.bake_target}}
|
bake_target: ${{matrix.bake_target}}
|
||||||
|
|||||||
32
.github/workflows/deps.yml
vendored
32
.github/workflows/deps.yml
vendored
@@ -51,10 +51,14 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
description: Pre-build cargo dependency targets
|
description: Pre-build cargo dependency targets
|
||||||
|
show_docs:
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
description: Pre-build cargo rustdoc targets
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
systems:
|
systems:
|
||||||
if: inputs.show_systems
|
if: ${{ !failure() && !cancelled() && inputs.show_systems }}
|
||||||
name: System
|
name: System
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
with:
|
with:
|
||||||
@@ -71,7 +75,7 @@ jobs:
|
|||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
|
|
||||||
buildsys:
|
buildsys:
|
||||||
if: inputs.show_systems
|
if: ${{ !failure() && !cancelled() && inputs.show_systems }}
|
||||||
name: Builder
|
name: Builder
|
||||||
needs: [systems]
|
needs: [systems]
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
@@ -89,7 +93,7 @@ jobs:
|
|||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
|
|
||||||
sources:
|
sources:
|
||||||
if: inputs.show_sources
|
if: ${{ !failure() && !cancelled() && inputs.show_sources }}
|
||||||
name: Acquire
|
name: Acquire
|
||||||
needs: [buildsys]
|
needs: [buildsys]
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
@@ -107,7 +111,7 @@ jobs:
|
|||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
|
|
||||||
rocksdb:
|
rocksdb:
|
||||||
if: inputs.show_rocksdb
|
if: ${{ !failure() && !cancelled() && inputs.show_rocksdb }}
|
||||||
name: RocksDB
|
name: RocksDB
|
||||||
needs: [sources]
|
needs: [sources]
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
@@ -125,7 +129,7 @@ jobs:
|
|||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
if: inputs.show_cargo
|
if: ${{ !failure() && !cancelled() && inputs.show_cargo }}
|
||||||
name: Build
|
name: Build
|
||||||
needs: [rocksdb]
|
needs: [rocksdb]
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
@@ -141,3 +145,21 @@ jobs:
|
|||||||
machines: ${{inputs.machines}}
|
machines: ${{inputs.machines}}
|
||||||
excludes: ${{inputs.excludes}}
|
excludes: ${{inputs.excludes}}
|
||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
|
|
||||||
|
docs:
|
||||||
|
if: ${{ !failure() && !cancelled() && inputs.show_docs }}
|
||||||
|
name: Docs
|
||||||
|
needs: [deps]
|
||||||
|
uses: ./.github/workflows/bake.yml
|
||||||
|
with:
|
||||||
|
bake_targets: '["docs"]'
|
||||||
|
cargo_profiles: ${{inputs.cargo_profiles}}
|
||||||
|
feat_sets: ${{inputs.feat_sets}}
|
||||||
|
rust_toolchains: ${{inputs.rust_toolchains}}
|
||||||
|
sys_names: ${{inputs.sys_names}}
|
||||||
|
sys_versions: ${{inputs.sys_versions}}
|
||||||
|
rust_targets: ${{inputs.rust_targets}}
|
||||||
|
sys_targets: ${{inputs.sys_targets}}
|
||||||
|
machines: ${{inputs.machines}}
|
||||||
|
excludes: ${{inputs.excludes}}
|
||||||
|
includes: ${{inputs.includes}}
|
||||||
|
|||||||
19
.github/workflows/lint.yml
vendored
19
.github/workflows/lint.yml
vendored
@@ -91,7 +91,6 @@ jobs:
|
|||||||
clippy:
|
clippy:
|
||||||
if: ${{ !failure() && !cancelled() }}
|
if: ${{ !failure() && !cancelled() }}
|
||||||
name: Clippy
|
name: Clippy
|
||||||
needs: [fmt, audit, lychee]
|
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
with:
|
with:
|
||||||
bake_targets: '["clippy"]'
|
bake_targets: '["clippy"]'
|
||||||
@@ -105,21 +104,3 @@ jobs:
|
|||||||
machines: ${{inputs.machines}}
|
machines: ${{inputs.machines}}
|
||||||
excludes: ${{inputs.excludes}}
|
excludes: ${{inputs.excludes}}
|
||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
|
|
||||||
doc:
|
|
||||||
if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0]) }}
|
|
||||||
name: Docs
|
|
||||||
needs: [clippy]
|
|
||||||
uses: ./.github/workflows/bake.yml
|
|
||||||
with:
|
|
||||||
bake_targets: '["docs"]'
|
|
||||||
cargo_profiles: '["test"]'
|
|
||||||
feat_sets: ${{inputs.feat_sets}}
|
|
||||||
rust_toolchains: '["nightly"]'
|
|
||||||
sys_names: ${{inputs.sys_names}}
|
|
||||||
sys_versions: ${{inputs.sys_versions}}
|
|
||||||
rust_targets: ${{inputs.rust_targets}}
|
|
||||||
sys_targets: ${{inputs.sys_targets}}
|
|
||||||
machines: ${{inputs.machines}}
|
|
||||||
excludes: ${{inputs.excludes}}
|
|
||||||
includes: ${{inputs.includes}}
|
|
||||||
|
|||||||
9
.github/workflows/main.yml
vendored
9
.github/workflows/main.yml
vendored
@@ -60,12 +60,12 @@ jobs:
|
|||||||
sys_targets: ${{vars.sys_TARGETS}}
|
sys_targets: ${{vars.sys_TARGETS}}
|
||||||
sys_versions: ${{vars.SYS_VERSIONS}}
|
sys_versions: ${{vars.SYS_VERSIONS}}
|
||||||
machines: ${{vars.MACHINES}}
|
machines: ${{vars.MACHINES}}
|
||||||
complement: true
|
complement: ${{fromJSON(vars.COMPLEMENT || 'true')}}
|
||||||
|
|
||||||
package:
|
package:
|
||||||
if: ${{ !failure() && !cancelled() }}
|
if: ${{ !failure() && !cancelled() }}
|
||||||
name: Package
|
name: Package
|
||||||
needs: [test]
|
needs: [lint]
|
||||||
uses: ./.github/workflows/package.yml
|
uses: ./.github/workflows/package.yml
|
||||||
with:
|
with:
|
||||||
cargo_profiles: '["release"]'
|
cargo_profiles: '["release"]'
|
||||||
@@ -80,7 +80,7 @@ jobs:
|
|||||||
publish:
|
publish:
|
||||||
if: ${{ !failure() && !cancelled() }}
|
if: ${{ !failure() && !cancelled() }}
|
||||||
name: Publish
|
name: Publish
|
||||||
needs: [package]
|
needs: [test, package]
|
||||||
uses: ./.github/workflows/publish.yml
|
uses: ./.github/workflows/publish.yml
|
||||||
with:
|
with:
|
||||||
cargo_profiles: '["release"]'
|
cargo_profiles: '["release"]'
|
||||||
@@ -91,3 +91,6 @@ jobs:
|
|||||||
rust_targets: ${{vars.RUST_TARGETS}}
|
rust_targets: ${{vars.RUST_TARGETS}}
|
||||||
sys_targets: ${{vars.sys_TARGETS}}
|
sys_targets: ${{vars.sys_TARGETS}}
|
||||||
machines: ${{vars.MACHINES}}
|
machines: ${{vars.MACHINES}}
|
||||||
|
secrets:
|
||||||
|
dockerhub_token: ${{ secrets.dockerhub_token }}
|
||||||
|
ghcr_token: ${{ secrets.ghcr_token }}
|
||||||
|
|||||||
19
.github/workflows/package.yml
vendored
19
.github/workflows/package.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
|||||||
name: Deb
|
name: Deb
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
with:
|
with:
|
||||||
bake_targets: '["pkg-deb-install"]'
|
bake_targets: '["pkg-deb"]'
|
||||||
cargo_profiles: ${{inputs.cargo_profiles}}
|
cargo_profiles: ${{inputs.cargo_profiles}}
|
||||||
feat_sets: '["all"]'
|
feat_sets: '["all"]'
|
||||||
rust_toolchains: ${{inputs.rust_toolchains}}
|
rust_toolchains: ${{inputs.rust_toolchains}}
|
||||||
@@ -71,3 +71,20 @@ jobs:
|
|||||||
machines: ${{inputs.machines}}
|
machines: ${{inputs.machines}}
|
||||||
excludes: ${{inputs.excludes}}
|
excludes: ${{inputs.excludes}}
|
||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
|
|
||||||
|
static:
|
||||||
|
if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) }}
|
||||||
|
name: Standalone
|
||||||
|
uses: ./.github/workflows/bake.yml
|
||||||
|
with:
|
||||||
|
bake_targets: '["standalone"]'
|
||||||
|
cargo_profiles: ${{inputs.cargo_profiles}}
|
||||||
|
feat_sets: '["all"]'
|
||||||
|
rust_toolchains: ${{inputs.rust_toolchains}}
|
||||||
|
sys_names: ${{inputs.sys_names}}
|
||||||
|
sys_versions: ${{inputs.sys_versions}}
|
||||||
|
rust_targets: ${{inputs.rust_targets}}
|
||||||
|
sys_targets: ${{inputs.sys_targets}}
|
||||||
|
machines: ${{inputs.machines}}
|
||||||
|
excludes: ${{inputs.excludes}}
|
||||||
|
includes: ${{inputs.includes}}
|
||||||
|
|||||||
124
.github/workflows/publish.yml
vendored
124
.github/workflows/publish.yml
vendored
@@ -36,38 +36,98 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
default: '[]'
|
default: '[]'
|
||||||
description: Matrix inclusions
|
description: Matrix inclusions
|
||||||
|
secrets:
|
||||||
|
dockerhub_token:
|
||||||
|
ghcr_token:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dockerhub:
|
containers:
|
||||||
if: ${{ !failure() && !cancelled() && github.ref == 'refs/heads/main' }}
|
if: ${{ !failure() && !cancelled() }}
|
||||||
name: DockerHub
|
name: Publish via Github
|
||||||
uses: ./.github/workflows/bake.yml
|
runs-on: ${{matrix.machine}}
|
||||||
with:
|
permissions: write-all
|
||||||
bake_targets: '["dockerhub"]'
|
strategy:
|
||||||
cargo_profiles: ${{inputs.cargo_profiles}}
|
fail-fast: false
|
||||||
feat_sets: ${{inputs.feat_sets}}
|
matrix:
|
||||||
rust_toolchains: ${{inputs.rust_toolchains}}
|
bake_target: ${{fromJSON('["github", "dockerhub"]')}}
|
||||||
sys_names: ${{inputs.sys_names}}
|
cargo_profile: ${{fromJSON(inputs.cargo_profiles)}}
|
||||||
sys_versions: ${{inputs.sys_versions}}
|
rust_toolchain: ${{fromJSON(inputs.rust_toolchains)}}
|
||||||
rust_targets: ${{inputs.rust_targets}}
|
feat_set: ${{fromJSON(inputs.feat_sets)}}
|
||||||
sys_targets: ${{inputs.sys_targets}}
|
sys_name: ${{fromJSON(inputs.sys_names)}}
|
||||||
machines: ${{inputs.machines}}
|
sys_version: ${{fromJSON(inputs.sys_versions)}}
|
||||||
excludes: ${{inputs.excludes}}
|
rust_target: ${{fromJSON(inputs.rust_targets)}}
|
||||||
includes: ${{inputs.includes}}
|
sys_target: ${{fromJSON(inputs.sys_targets)}}
|
||||||
|
machine: ${{fromJSON(inputs.machines)}}
|
||||||
|
exclude: ${{fromJSON(inputs.excludes)}}
|
||||||
|
include: ${{fromJSON(inputs.includes)}}
|
||||||
|
|
||||||
ghcr:
|
steps:
|
||||||
if: ${{ !failure() && !cancelled() && github.ref == 'refs/heads/main' }}
|
- name: GitHub Login
|
||||||
name: GitHub Container Registry
|
uses: docker/login-action@v3
|
||||||
uses: ./.github/workflows/bake.yml
|
with:
|
||||||
with:
|
registry: ghcr.io
|
||||||
bake_targets: '["github"]'
|
username: ${{ github.actor }}
|
||||||
cargo_profiles: ${{inputs.cargo_profiles}}
|
password: ${{ secrets.ghcr_token }}
|
||||||
feat_sets: ${{inputs.feat_sets}}
|
|
||||||
rust_toolchains: ${{inputs.rust_toolchains}}
|
- uses: actions/checkout@v4
|
||||||
sys_names: ${{inputs.sys_names}}
|
- name: DockerHub Login
|
||||||
sys_versions: ${{inputs.sys_versions}}
|
uses: docker/login-action@v3
|
||||||
rust_targets: ${{inputs.rust_targets}}
|
with:
|
||||||
sys_targets: ${{inputs.sys_targets}}
|
registry: docker.io
|
||||||
machines: ${{inputs.machines}}
|
username: ${{ github.actor }}
|
||||||
excludes: ${{inputs.excludes}}
|
password: ${{ secrets.dockerhub_token }}
|
||||||
includes: ${{inputs.includes}}
|
|
||||||
|
- name: Bake
|
||||||
|
env:
|
||||||
|
bake_target: ${{matrix.bake_target}}
|
||||||
|
cargo_profile: ${{matrix.cargo_profile}}
|
||||||
|
rust_toolchain: ${{matrix.rust_toolchain}}
|
||||||
|
rust_target: ${{matrix.rust_target}}
|
||||||
|
feat_set: ${{matrix.feat_set}}
|
||||||
|
sys_name: ${{matrix.sys_name}}
|
||||||
|
sys_version: ${{matrix.sys_version}}
|
||||||
|
sys_target: ${{matrix.sys_target}}
|
||||||
|
machine: ${{matrix.machine}}
|
||||||
|
acct: ${{github.actor}}
|
||||||
|
repo: ${{github.repository}}
|
||||||
|
CI_VERBOSE_ENV: ${{inputs.verbose_env}}
|
||||||
|
CI_SILENT_BAKE: ${{inputs.silent_bake}}
|
||||||
|
CI_PRINT_BAKE: ${{inputs.print_bake}}
|
||||||
|
|
||||||
|
run: |
|
||||||
|
docker/bake.sh ${{matrix.bake_target}}
|
||||||
|
|
||||||
|
packages:
|
||||||
|
if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) }}
|
||||||
|
name: Publish packages
|
||||||
|
runs-on: ${{matrix.machine}}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
target: ${{fromJSON('[["pkg-rpm","tuwunel-1.0.0-1.x86_64.rpm"],["pkg-deb","tuwunel_1.0.0-1_amd64.deb"],["standalone", "tuwunel"]]')}}
|
||||||
|
cargo_profile: ${{fromJSON(inputs.cargo_profiles)}}
|
||||||
|
rust_toolchain: ${{fromJSON(inputs.rust_toolchains)}}
|
||||||
|
feat_set: ${{fromJSON('["all"]')}}
|
||||||
|
sys_name: ${{fromJSON(inputs.sys_names)}}
|
||||||
|
sys_version: ${{fromJSON(inputs.sys_versions)}}
|
||||||
|
rust_target: ${{fromJSON(inputs.rust_targets)}}
|
||||||
|
sys_target: ${{fromJSON(inputs.sys_targets)}}
|
||||||
|
machine: ${{fromJSON(inputs.machines)}}
|
||||||
|
exclude: ${{fromJSON(inputs.excludes)}}
|
||||||
|
include: ${{fromJSON(inputs.includes)}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Extract
|
||||||
|
env:
|
||||||
|
iid: ${{matrix.target[0]}}--${{matrix.cargo_profile}}--${{matrix.rust_toolchain}}--${{matrix.rust_target}}--${{matrix.feat_set}}--${{matrix.sys_name}}--${{matrix.sys_version}}--${{matrix.sys_target}}
|
||||||
|
file: ${{matrix.target[1]}}
|
||||||
|
|
||||||
|
run: |
|
||||||
|
cid=$(docker create "$iid" /)
|
||||||
|
docker cp "$cid:$file" .
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{matrix.target[1]}}
|
||||||
|
path: ${{matrix.target[1]}}
|
||||||
|
|||||||
23
.github/workflows/test.yml
vendored
23
.github/workflows/test.yml
vendored
@@ -94,7 +94,6 @@ jobs:
|
|||||||
if: ${{inputs.complement && contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])}}
|
if: ${{inputs.complement && contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])}}
|
||||||
name: Complement Testee
|
name: Complement Testee
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
needs: [smoke]
|
|
||||||
with:
|
with:
|
||||||
bake_targets: '["complement-testee"]'
|
bake_targets: '["complement-testee"]'
|
||||||
cargo_profiles: '["test"]'
|
cargo_profiles: '["test"]'
|
||||||
@@ -132,7 +131,9 @@ jobs:
|
|||||||
include: ${{fromJSON(inputs.includes)}}
|
include: ${{fromJSON(inputs.includes)}}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Complement
|
- uses: actions/checkout@v3
|
||||||
|
- name: Execute
|
||||||
|
id: execute
|
||||||
env:
|
env:
|
||||||
cargo_profile: ${{matrix.cargo_profile}}
|
cargo_profile: ${{matrix.cargo_profile}}
|
||||||
rust_toolchain: ${{matrix.rust_toolchain}}
|
rust_toolchain: ${{matrix.rust_toolchain}}
|
||||||
@@ -145,3 +146,21 @@ jobs:
|
|||||||
|
|
||||||
run: |
|
run: |
|
||||||
docker/complement.sh
|
docker/complement.sh
|
||||||
|
|
||||||
|
- name: Results
|
||||||
|
id: extract
|
||||||
|
env:
|
||||||
|
name: complement_tester__${{matrix.cargo_profile}}__${{matrix.rust_toolchain}}__${{matrix.rust_target}}__${{matrix.feat_set}}__${{matrix.sys_name}}__${{matrix.sys_version}}__${{matrix.sys_target}}
|
||||||
|
tag: latest
|
||||||
|
|
||||||
|
run: |
|
||||||
|
cid=$(cat "$name")
|
||||||
|
docker cp "$cid:/usr/src/complement/new_results.jsonl" tests/test_results/complement/test_results.jsonl
|
||||||
|
git diff --exit-code --color --color-moved
|
||||||
|
|
||||||
|
- name: Artifacts
|
||||||
|
id: upload
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: test_results.${{matrix.feat_set}}.${{matrix.sys_name}}.${{matrix.sys_target}}.jsonl
|
||||||
|
path: ./tests/test_results/complement/test_results.jsonl
|
||||||
|
|||||||
@@ -33,5 +33,6 @@ RUN \
|
|||||||
--target "${CARGO_TARGET}" \
|
--target "${CARGO_TARGET}" \
|
||||||
--target-dir "${CARGO_TARGET_DIR}" \
|
--target-dir "${CARGO_TARGET_DIR}" \
|
||||||
--manifest-path Cargo.toml \
|
--manifest-path Cargo.toml \
|
||||||
|
--color always \
|
||||||
${cargo_args}
|
${cargo_args}
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -48,11 +48,14 @@ RUN \
|
|||||||
"-DCMAKE_BUILD_TYPE=${rocksdb_build_type}" \
|
"-DCMAKE_BUILD_TYPE=${rocksdb_build_type}" \
|
||||||
"-DBUILD_SHARED_LIBS=${rocksdb_shared}" \
|
"-DBUILD_SHARED_LIBS=${rocksdb_shared}" \
|
||||||
"-DCMAKE_CXX_FLAGS:STRING=${rocksdb_cxx_flags}" \
|
"-DCMAKE_CXX_FLAGS:STRING=${rocksdb_cxx_flags}" \
|
||||||
"-DCMAKE_CXX_FLAGS_RELEASE:STRING=-g0 -O${rocksdb_opt_level}" \
|
"-DCMAKE_CXX_FLAGS_RELEASE:STRING=-g0 -O${rocksdb_opt_level} -DNDEBUG" \
|
||||||
"-DPORTABLE=${rocksdb_portable}" \
|
"-DPORTABLE=${rocksdb_portable}" \
|
||||||
"-DFAIL_ON_WARNINGS=0" \
|
"-DFAIL_ON_WARNINGS=0" \
|
||||||
"-DUSE_RTTI=1" \
|
"-DUSE_RTTI=0" \
|
||||||
|
"-DWITH_RUNTIME_DEBUG=0" \
|
||||||
"-DWITH_JNI=0" \
|
"-DWITH_JNI=0" \
|
||||||
|
"-DWITH_EXAMPLES=0" \
|
||||||
|
"-DWITH_BENCHMARK=0" \
|
||||||
"-DWITH_BENCHMARK_TOOLS=0" \
|
"-DWITH_BENCHMARK_TOOLS=0" \
|
||||||
"-DWITH_TRACE_TOOLS=0" \
|
"-DWITH_TRACE_TOOLS=0" \
|
||||||
"-DWITH_CORE_TOOLS=0" \
|
"-DWITH_CORE_TOOLS=0" \
|
||||||
|
|||||||
@@ -194,10 +194,8 @@ group "publish" {
|
|||||||
target "github" {
|
target "github" {
|
||||||
name = elem("github", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
name = elem("github", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
tags = [
|
tags = [
|
||||||
"ghcr.io/matrix-construct/tuwunel:${cargo_profile}-${feat_set}-${sys_target}",
|
"ghcr.io/matrix-construct/tuwunel:${GITHUB_REF_NAME}-${cargo_profile}-${feat_set}-${sys_target}",
|
||||||
(GITHUB_REF_NAME == "main" && cargo_profile == "release" && feat_set == "all")?
|
(cargo_profile == "release" && feat_set == "all")?
|
||||||
"ghcr.io/matrix-construct/tuwunel:main": "",
|
|
||||||
(GITHUB_REF_NAME == "main" && cargo_profile == "release" && feat_set == "all")?
|
|
||||||
"ghcr.io/matrix-construct/tuwunel:${GITHUB_REF_NAME}": "",
|
"ghcr.io/matrix-construct/tuwunel:${GITHUB_REF_NAME}": "",
|
||||||
(GITHUB_REF_NAME == "main" && cargo_profile == "release" && feat_set == "all")?
|
(GITHUB_REF_NAME == "main" && cargo_profile == "release" && feat_set == "all")?
|
||||||
"ghcr.io/matrix-construct/tuwunel:latest": "",
|
"ghcr.io/matrix-construct/tuwunel:latest": "",
|
||||||
@@ -205,32 +203,33 @@ target "github" {
|
|||||||
output = ["type=registry,compression=zstd,mode=min"]
|
output = ["type=registry,compression=zstd,mode=min"]
|
||||||
matrix = cargo_rust_feat_sys
|
matrix = cargo_rust_feat_sys
|
||||||
inherits = [
|
inherits = [
|
||||||
elem("install", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target]),
|
elem("tuwunel", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target]),
|
||||||
]
|
]
|
||||||
contexts = {
|
|
||||||
input = elem("target:install", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
|
||||||
}
|
|
||||||
target = "tuwunel"
|
|
||||||
dockerfile-inline =<<EOF
|
|
||||||
FROM input AS tuwunel
|
|
||||||
EXPOSE 8008 8448
|
|
||||||
ENTRYPOINT ["${cargo_install_root}/bin/tuwunel"]
|
|
||||||
EOF
|
|
||||||
}
|
}
|
||||||
|
|
||||||
target "dockerhub" {
|
target "dockerhub" {
|
||||||
name = elem("dockerhub", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
name = elem("dockerhub", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
tags = [
|
tags = [
|
||||||
"${repo}:${cargo_profile}-${feat_set}-${sys_target}",
|
"jevolk/tuwunel:${GITHUB_REF_NAME}-${cargo_profile}-${feat_set}-${sys_target}",
|
||||||
|
(cargo_profile == "release" && feat_set == "all")?
|
||||||
|
"jevolk/tuwunel:${GITHUB_REF_NAME}": "",
|
||||||
(GITHUB_REF_NAME == "main" && cargo_profile == "release" && feat_set == "all")?
|
(GITHUB_REF_NAME == "main" && cargo_profile == "release" && feat_set == "all")?
|
||||||
"${repo}:main": "",
|
"jevolk/tuwunel:latest": "",
|
||||||
(GITHUB_REF_NAME == "main" && cargo_profile == "release" && feat_set == "all")?
|
|
||||||
"${repo}:${GITHUB_REF_NAME}": "",
|
|
||||||
(GITHUB_REF_NAME == "main" && cargo_profile == "release" && feat_set == "all")?
|
|
||||||
"${repo}:latest": "",
|
|
||||||
]
|
]
|
||||||
output = ["type=registry,compression=zstd,mode=min"]
|
output = ["type=registry,compression=zstd,mode=min"]
|
||||||
matrix = cargo_rust_feat_sys
|
matrix = cargo_rust_feat_sys
|
||||||
|
inherits = [
|
||||||
|
elem("tuwunel", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target]),
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "tuwunel" {
|
||||||
|
name = elem("tuwunel", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
|
tags = [
|
||||||
|
elem_tag("tuwunel", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target], "latest"),
|
||||||
|
]
|
||||||
|
output = ["type=docker,compression=zstd,mode=min"]
|
||||||
|
matrix = cargo_rust_feat_sys
|
||||||
inherits = [
|
inherits = [
|
||||||
elem("install", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target]),
|
elem("install", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target]),
|
||||||
]
|
]
|
||||||
@@ -478,6 +477,28 @@ install_labels = {
|
|||||||
"org.opencontainers.image.version" = "${package_version}"
|
"org.opencontainers.image.version" = "${package_version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
target "standalone" {
|
||||||
|
name = elem("standalone", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
|
tags = [
|
||||||
|
elem_tag("standalone", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target], "latest"),
|
||||||
|
]
|
||||||
|
target = "standalone"
|
||||||
|
labels = install_labels
|
||||||
|
output = ["type=docker,compression=zstd,mode=min"]
|
||||||
|
cache_to = ["type=local,compression=zstd,mode=min"]
|
||||||
|
matrix = cargo_rust_feat_sys
|
||||||
|
inherits = [
|
||||||
|
elem("install", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target]),
|
||||||
|
]
|
||||||
|
contexts = {
|
||||||
|
input = elem("target:install", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target]),
|
||||||
|
}
|
||||||
|
dockerfile-inline =<<EOF
|
||||||
|
FROM scratch AS standalone
|
||||||
|
COPY --from=input /usr/bin/tuwunel .
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
target "install" {
|
target "install" {
|
||||||
name = elem("install", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
name = elem("install", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
tags = [
|
tags = [
|
||||||
@@ -493,7 +514,8 @@ target "install" {
|
|||||||
]
|
]
|
||||||
contexts = {
|
contexts = {
|
||||||
input = elem("target:diner", [feat_set, sys_name, sys_version, sys_target])
|
input = elem("target:diner", [feat_set, sys_name, sys_version, sys_target])
|
||||||
output = elem("target:installer", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target]),
|
output = elem("target:installer", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
|
docs = elem("target:docs", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -794,7 +816,7 @@ target "docs" {
|
|||||||
}
|
}
|
||||||
args = {
|
args = {
|
||||||
cargo_cmd = "doc"
|
cargo_cmd = "doc"
|
||||||
cargo_args = "--no-deps --document-private-items --color always"
|
cargo_args = "--no-deps --document-private-items"
|
||||||
RUSTDOCFLAGS = "-D warnings"
|
RUSTDOCFLAGS = "-D warnings"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,19 +34,31 @@ tester_image="complement-tester--${feat_set}--${sys_name}--${sys_version}--${sys
|
|||||||
testee_image="complement-testee--${cargo_profile}--${rust_toolchain}--${rust_target}--${feat_set}--${sys_name}--${sys_version}--${sys_target}"
|
testee_image="complement-testee--${cargo_profile}--${rust_toolchain}--${rust_target}--${feat_set}--${sys_name}--${sys_version}--${sys_target}"
|
||||||
name="complement_tester__${cargo_profile}__${rust_toolchain}__${rust_target}__${feat_set}__${sys_name}__${sys_version}__${sys_target}"
|
name="complement_tester__${cargo_profile}__${rust_toolchain}__${rust_target}__${feat_set}__${sys_name}__${sys_version}__${sys_target}"
|
||||||
sock="/var/run/docker.sock"
|
sock="/var/run/docker.sock"
|
||||||
arg="--rm --name $name -v $sock:$sock --network=host $tester_image ${testee_image}"
|
arg="--name $name -v $sock:$sock --network=host $tester_image ${testee_image}"
|
||||||
|
|
||||||
trap 'set +x; date; echo -e "\033[1;41;37mFAIL\033[0m"' ERR
|
|
||||||
|
|
||||||
if test "$CI_VERBOSE_ENV" = "true"; then
|
if test "$CI_VERBOSE_ENV" = "true"; then
|
||||||
date
|
date
|
||||||
env
|
env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$CI" = "true"; then
|
||||||
|
arg="-d $arg"
|
||||||
|
else
|
||||||
|
arg="--rm $arg"
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker rm -f "$name" 2>/dev/null
|
||||||
|
|
||||||
|
trap 'set +x; date; echo -e "\033[1;41;37mFAIL\033[0m"' ERR
|
||||||
|
|
||||||
set -x -e
|
set -x -e
|
||||||
cid=$(docker run $arg)
|
cid=$(docker run $arg)
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
|
if test "$CI" = "true"; then
|
||||||
|
echo -n "$cid" > "$name"
|
||||||
|
fi
|
||||||
|
|
||||||
trap 'docker container stop $cid; set +x; date; echo -e "\033[1;41;37mFAIL\033[0m"' INT
|
trap 'docker container stop $cid; set +x; date; echo -e "\033[1;41;37mFAIL\033[0m"' INT
|
||||||
|
|
||||||
docker logs -f "$cid"
|
docker logs -f "$cid"
|
||||||
|
|||||||
@@ -12,29 +12,15 @@ OCI images for tuwunel are available in the registries listed below.
|
|||||||
| Registry | Image | Size | Notes |
|
| Registry | Image | Size | Notes |
|
||||||
| --------------- | --------------------------------------------------------------- | ----------------------------- | ---------------------- |
|
| --------------- | --------------------------------------------------------------- | ----------------------------- | ---------------------- |
|
||||||
| GitHub Registry | [ghcr.io/matrix-construct/tuwunel:latest][gh] | ![Image Size][shield-latest] | Stable latest tagged image. |
|
| GitHub Registry | [ghcr.io/matrix-construct/tuwunel:latest][gh] | ![Image Size][shield-latest] | Stable latest tagged image. |
|
||||||
| GitLab Registry | [registry.gitlab.com/jevolk/tuwunel:latest][gl] | ![Image Size][shield-latest] | Stable latest tagged image. |
|
|
||||||
| Docker Hub | [docker.io/jevolk/tuwunel:latest][dh] | ![Image Size][shield-latest] | Stable latest tagged image. |
|
| Docker Hub | [docker.io/jevolk/tuwunel:latest][dh] | ![Image Size][shield-latest] | Stable latest tagged image. |
|
||||||
| GitHub Registry | [ghcr.io/matrix-construct/tuwunel:main][gh] | ![Image Size][shield-main] | Stable main branch. |
|
| GitHub Registry | [ghcr.io/matrix-construct/tuwunel:main][gh] | ![Image Size][shield-main] | Stable main branch. |
|
||||||
| GitLab Registry | [registry.gitlab.com/jevolk/tuwunel:main][gl] | ![Image Size][shield-main] | Stable main branch. |
|
|
||||||
| Docker Hub | [docker.io/jevolk/tuwunel:main][dh] | ![Image Size][shield-main] | Stable main branch. |
|
| Docker Hub | [docker.io/jevolk/tuwunel:main][dh] | ![Image Size][shield-main] | Stable main branch. |
|
||||||
|
|
||||||
[dh]: https://hub.docker.com/r/jevolk/tuwunel
|
[dh]: https://hub.docker.com/r/jevolk/tuwunel
|
||||||
[gh]: https://github.com/jevolk/tuwunel/pkgs/container/tuwunel
|
[gh]: https://github.com/matrix-construct/tuwunel/pkgs/container/tuwunel
|
||||||
[gl]: https://gitlab.com/tuwunel/tuwunel/container_registry/6369729
|
|
||||||
[shield-latest]: https://img.shields.io/docker/image-size/jevolk/tuwunel/latest
|
[shield-latest]: https://img.shields.io/docker/image-size/jevolk/tuwunel/latest
|
||||||
[shield-main]: https://img.shields.io/docker/image-size/jevolk/tuwunel/main
|
[shield-main]: https://img.shields.io/docker/image-size/jevolk/tuwunel/main
|
||||||
|
|
||||||
OCI image `.tar.gz` files are also hosted directly at when uploaded by CI with a
|
|
||||||
commit hash/revision or a tagged release: <https://pup.systems/~strawberry/tuwunel/>
|
|
||||||
|
|
||||||
Use
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker image pull $LINK
|
|
||||||
```
|
|
||||||
|
|
||||||
to pull it to your machine.
|
|
||||||
|
|
||||||
### Run
|
### Run
|
||||||
|
|
||||||
When you have the image you can simply run it with
|
When you have the image you can simply run it with
|
||||||
|
|||||||
Reference in New Issue
Block a user