Compare commits
No commits in common. "ff98a4a5116c39edff61fc6c9a6e390935dce7b1" and "dc80b5ffee03a635f8da71ebd9a45c10e665c210" have entirely different histories.
ff98a4a511
...
dc80b5ffee
9 changed files with 33 additions and 61 deletions
|
@ -5,7 +5,6 @@ RUN set -eux; \
|
||||||
apt-get install --no-install-recommends -y \
|
apt-get install --no-install-recommends -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
curl \
|
curl \
|
||||||
git \
|
|
||||||
gpg \
|
gpg \
|
||||||
jq \
|
jq \
|
||||||
libatk1.0-dev \
|
libatk1.0-dev \
|
||||||
|
|
|
@ -40,4 +40,4 @@ jobs:
|
||||||
pr: ((.:pr))
|
pr: ((.:pr))
|
||||||
gitea_api_key: ((gitea_api_key))
|
gitea_api_key: ((gitea_api_key))
|
||||||
instance_vars:
|
instance_vars:
|
||||||
number: ((.:pr.number))
|
n: ((.:pr.number))
|
||||||
|
|
|
@ -37,6 +37,7 @@ resources:
|
||||||
url: http://forgejo:3000
|
url: http://forgejo:3000
|
||||||
owner: bitsquid_dt
|
owner: bitsquid_dt
|
||||||
repo: dtmt
|
repo: dtmt
|
||||||
|
sha: ((pr.head.sha))
|
||||||
context: lint/clippy
|
context: lint/clippy
|
||||||
description: Checking for common mistakes and opportunities for code improvement
|
description: Checking for common mistakes and opportunities for code improvement
|
||||||
|
|
||||||
|
@ -47,6 +48,7 @@ resources:
|
||||||
url: http://forgejo:3000
|
url: http://forgejo:3000
|
||||||
owner: bitsquid_dt
|
owner: bitsquid_dt
|
||||||
repo: dtmt
|
repo: dtmt
|
||||||
|
sha: ((pr.head.sha))
|
||||||
context: build/msvc
|
context: build/msvc
|
||||||
description: "Build for the target platform: msvc"
|
description: "Build for the target platform: msvc"
|
||||||
|
|
||||||
|
@ -57,6 +59,7 @@ resources:
|
||||||
url: http://forgejo:3000
|
url: http://forgejo:3000
|
||||||
owner: bitsquid_dt
|
owner: bitsquid_dt
|
||||||
repo: dtmt
|
repo: dtmt
|
||||||
|
sha: ((pr.head.sha))
|
||||||
context: build/linux
|
context: build/linux
|
||||||
description: "Build for the target platform: linux"
|
description: "Build for the target platform: linux"
|
||||||
|
|
||||||
|
@ -69,29 +72,23 @@ jobs:
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: success
|
state: success
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
|
||||||
on_failure:
|
on_failure:
|
||||||
put: state-failure
|
put: state-success
|
||||||
resource: pr-status-lint-clippy
|
resource: pr-status-lint-clippy
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: failure
|
state: failure
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
|
||||||
plan:
|
plan:
|
||||||
- get: repo
|
|
||||||
trigger: true
|
|
||||||
|
|
||||||
- load_var: git_sha
|
|
||||||
file: repo/.git/ref
|
|
||||||
|
|
||||||
- put: state-pending
|
- put: state-pending
|
||||||
resource: pr-status-lint-clippy
|
resource: pr-status-lint-clippy
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: pending
|
state: pending
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
- get: repo
|
||||||
|
trigger: true
|
||||||
|
|
||||||
- task: check
|
- task: check
|
||||||
file: repo/.ci/tasks/clippy.yml
|
file: repo/.ci/tasks/clippy.yml
|
||||||
|
@ -106,29 +103,23 @@ jobs:
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: success
|
state: success
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
|
||||||
on_failure:
|
on_failure:
|
||||||
put: state-failure
|
put: state-success
|
||||||
resource: pr-status-build-msvc
|
resource: pr-status-build-msvc
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: failure
|
state: failure
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
|
||||||
plan:
|
plan:
|
||||||
- get: repo
|
|
||||||
trigger: true
|
|
||||||
|
|
||||||
- load_var: git_sha
|
|
||||||
file: repo/.git/ref
|
|
||||||
|
|
||||||
- put: state-pending
|
- put: state-pending
|
||||||
resource: pr-status-build-msvc
|
resource: pr-status-build-msvc
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: pending
|
state: pending
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
- get: repo
|
||||||
|
trigger: true
|
||||||
|
|
||||||
- task: build
|
- task: build
|
||||||
file: repo/.ci/tasks/build.yml
|
file: repo/.ci/tasks/build.yml
|
||||||
|
@ -163,29 +154,23 @@ jobs:
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: success
|
state: success
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
|
||||||
on_failure:
|
on_failure:
|
||||||
put: state-failure
|
put: state-success
|
||||||
resource: pr-status-build-linux
|
resource: pr-status-build-linux
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: failure
|
state: failure
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
|
||||||
plan:
|
plan:
|
||||||
- get: repo
|
|
||||||
trigger: true
|
|
||||||
|
|
||||||
- load_var: git_sha
|
|
||||||
file: repo/.git/ref
|
|
||||||
|
|
||||||
- put: state-pending
|
- put: state-pending
|
||||||
resource: pr-status-build-linux
|
resource: pr-status-build-linux
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: pending
|
state: pending
|
||||||
sha: ((.:git_sha))
|
|
||||||
|
- get: repo
|
||||||
|
trigger: true
|
||||||
|
|
||||||
- task: build
|
- task: build
|
||||||
file: repo/.ci/tasks/build.yml
|
file: repo/.ci/tasks/build.yml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
@ -12,42 +12,39 @@ title() {
|
||||||
printf "\033[1m%s\033[0m\n" "$1"
|
printf "\033[1m%s\033[0m\n" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
cd "repo"
|
|
||||||
|
|
||||||
if [ -n "${PR:-}" ]; then
|
if [ -n "${PR:-}" ]; then
|
||||||
title "PR: $(echo "$PR" | jq '.number') - $(echo "$PR" | jq '.title')"
|
title "PR: $(echo "$PR" | jq '.number') - $(echo "$PR" | jq '.title')"
|
||||||
ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short "$(cat .git/ref || echo "HEAD")" 2>/dev/null || echo 'manual')"
|
ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short HEAD 2>/dev/null || echo 'manual')"
|
||||||
else
|
else
|
||||||
ref=$(git describe --tags)
|
ref=$(git describe --tags)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
title "Version: '$ref'"
|
title "Version is '$ref'"
|
||||||
echo "$ref" > "$OUTPUT/version"
|
echo "$ref" > "$OUTPUT/version"
|
||||||
|
|
||||||
|
cd "repo"
|
||||||
case "$TARGET" in
|
case "$TARGET" in
|
||||||
msvc)
|
msvc)
|
||||||
cp /src/*.lib ./lib/oodle/
|
cp /src/*.lib ./lib/oodle/
|
||||||
|
|
||||||
title "Building project for target $TARGET"
|
title "Build project for target $TARGET"
|
||||||
cargo build --color always --locked --release --target x86_64-pc-windows-msvc -Zbuild-std
|
cargo build --color always --locked --release --target x86_64-pc-windows-msvc -Zbuild-std
|
||||||
|
|
||||||
title "Install artifacts"
|
title "Install artifacts"
|
||||||
install -v -t "$OUTPUT/" target/x86_64-pc-windows-msvc/release/dtmt.exe
|
install -t "$OUTPUT/" target/x86_64-pc-windows-msvc/release/dtmt.exe
|
||||||
install -v -t "$OUTPUT/" target/x86_64-pc-windows-msvc/release/dtmm.exe
|
install -t "$OUTPUT/" target/x86_64-pc-windows-msvc/release/dtmm.exe
|
||||||
;;
|
;;
|
||||||
linux)
|
linux)
|
||||||
cp /src/*.a ./lib/oodle/
|
cp /src/*.a ./lib/oodle/
|
||||||
|
|
||||||
title "Building project for target $TARGET"
|
title "Build project for target $TARGET"
|
||||||
cargo build --color always --locked --profile release-lto
|
cargo build --color always --locked --profile release-lto
|
||||||
|
|
||||||
title "Installing artifacts"
|
title "Install artifacts"
|
||||||
install -v -t "$OUTPUT/" target/release-lto/dtmt
|
install -t "$OUTPUT/" target/release-lto/dtmt
|
||||||
install -v -t "$OUTPUT/" target/release-lto/dtmm
|
install -t "$OUTPUT/" target/release-lto/dtmm
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -e "\033[31;1mEnv var 'TARGET' must either be 'msvc' or 'linux'. Got '$TARGET'.\033[0m" >&2
|
echo "Env var 'TARGET' must either be 'msvc' or 'linux'. Got '$TARGET'." >&2
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
title "Done"
|
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -eu
|
set -eux
|
||||||
|
|
||||||
title() {
|
|
||||||
printf "\033[1m%s\033[0m\n" "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
title "Install clippy"
|
|
||||||
rustup component add clippy
|
rustup component add clippy
|
||||||
|
|
||||||
title "Run clippy"
|
|
||||||
cargo clippy --color always --no-deps
|
cargo clippy --color always --no-deps
|
||||||
|
|
||||||
title "Done"
|
|
||||||
|
|
1
.gitmodules
vendored
1
.gitmodules
vendored
|
@ -7,7 +7,6 @@
|
||||||
[submodule "lib/color-eyre"]
|
[submodule "lib/color-eyre"]
|
||||||
path = lib/color-eyre
|
path = lib/color-eyre
|
||||||
url = https://github.com/sclu1034/color-eyre.git
|
url = https://github.com/sclu1034/color-eyre.git
|
||||||
branch = "fork"
|
|
||||||
[submodule "lib/ansi-parser"]
|
[submodule "lib/ansi-parser"]
|
||||||
path = lib/ansi-parser
|
path = lib/ansi-parser
|
||||||
url = https://gitlab.com/lschwiderski/ansi-parser.git
|
url = https://gitlab.com/lschwiderski/ansi-parser.git
|
||||||
|
|
4
Justfile
4
Justfile
|
@ -29,7 +29,7 @@ ci-image-linux:
|
||||||
docker push registry.sclu1034.dev/dtmt-ci-base-linux
|
docker push registry.sclu1034.dev/dtmt-ci-base-linux
|
||||||
|
|
||||||
set-base-pipeline:
|
set-base-pipeline:
|
||||||
fly -t {{fly_target}} set-pipeline \
|
fly -t ((fly_target)) set-pipeline \
|
||||||
--pipeline dtmt-prs \
|
--pipeline dtmt-prs \
|
||||||
--config .ci/pipelines/base-pipeline.yml \
|
--config .ci/pipelines/base-pipeline.yml \
|
||||||
-v gitea_api_key=${GITEA_API_KEY} \
|
-v gitea_api_key=${GITEA_API_KEY} \
|
||||||
|
@ -46,7 +46,7 @@ set-pr-pipeline pr:
|
||||||
--pipeline dtmt-pr \
|
--pipeline dtmt-pr \
|
||||||
--config .ci/pipelines/pr.yml \
|
--config .ci/pipelines/pr.yml \
|
||||||
-v gitea_api_key=${GITEA_API_KEY} \
|
-v gitea_api_key=${GITEA_API_KEY} \
|
||||||
-i number={{pr}} \
|
-i n={{pr}} \
|
||||||
-y branch="$(yq -y '.head.ref' 'pr-{{pr}}.yaml')" \
|
-y branch="$(yq -y '.head.ref' 'pr-{{pr}}.yaml')" \
|
||||||
-y pr="$(cat 'pr-{{pr}}.yaml')"
|
-y pr="$(cat 'pr-{{pr}}.yaml')"
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0fa05eba9954be223b06468c8760b97e660f9941
|
Subproject commit 55f8c6b7481d462e50ee4a03a43253d80d648ae2
|
|
@ -1 +1 @@
|
||||||
Subproject commit 19120166f9fc7838b98c71fc348791abc820e323
|
Subproject commit 24da35e631099e914d6fc1bcc863228c48e540ec
|
Loading…
Add table
Add a link
Reference in a new issue