Skip to content

Commit

Permalink
fix: CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gabyx committed Jun 28, 2024
1 parent 5e77c97 commit b4caf58
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 53 deletions.
103 changes: 51 additions & 52 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
---
name: rdf-protect

on:
Expand All @@ -26,54 +25,54 @@ jobs:
source .gitlab/scripts/before-script.sh
just nix-develop-ci just format
lint:
runs-on: ubuntu-latest
container:
image: ghcr.io/sdsc-ordes/rdf-protect:ci-lint-1.0.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 2 - lint
run: |
source .gitlab/scripts/before-script.sh &&
just nix-develop-ci just lint
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/sdsc-ordes/rdf-protect:ci-build-1.0.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 3 - build
run: |
source .gitlab/scripts/before-script.sh &&
just nix-develop-ci just build
# - name: 3.1 - tests
# run: |
# source .gitlab/scripts/before-script.sh &&
# just nix-develop-ci just test

test:
runs-on: ubuntu-latest
container:
image: ghcr.io/sdsc-ordes/rdf-protect:ci-test-1.0.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 4 - test
run: |
source .gitlab/scripts/before-script.sh &&
just nix-develop-ci just test
package:
runs-on: ubuntu-latest
container:
image: ghcr.io/sdsc-ordes/rdf-protect:ci-package-1.0.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 5 - package (nix)
run: |
source .gitlab/scripts/before-script.sh &&
just build-package
# lint:
# runs-on: ubuntu-latest
# container:
# image: ghcr.io/sdsc-ordes/rdf-protect:ci-lint-1.0.0
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: 2 - lint
# run: |
# source .gitlab/scripts/before-script.sh &&
# just nix-develop-ci just lint
#
# build:
# runs-on: ubuntu-latest
# container:
# image: ghcr.io/sdsc-ordes/rdf-protect:ci-build-1.0.0
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: 3 - build
# run: |
# source .gitlab/scripts/before-script.sh &&
# just nix-develop-ci just build
# # - name: 3.1 - tests
# # run: |
# # source .gitlab/scripts/before-script.sh &&
# # just nix-develop-ci just test
#
# test:
# runs-on: ubuntu-latest
# container:
# image: ghcr.io/sdsc-ordes/rdf-protect:ci-test-1.0.0
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: 4 - test
# run: |
# source .gitlab/scripts/before-script.sh &&
# just nix-develop-ci just test
#
# package:
# runs-on: ubuntu-latest
# container:
# image: ghcr.io/sdsc-ordes/rdf-protect:ci-package-1.0.0
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: 5 - package (nix)
# run: |
# source .gitlab/scripts/before-script.sh &&
# just build-package
3 changes: 3 additions & 0 deletions .gitlab/scripts/before-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# This script is sourced.
set -u

print_info "Config global:"
git config --global --list | cat

ROOT_DIR=$(git rev-parse --show-toplevel)
. "$ROOT_DIR/tools/general.sh"

Expand Down
8 changes: 7 additions & 1 deletion tools/format-rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
cd "$ROOT_DIR"

print_info "Run Rust format."

fmt_args=()
if ci_is_running; then
fmt_args+=("--check")
fi

ci_wrap_container \
ghcr.io/sdsc-ordes/rdf-protect:ci-format-1.0.0 \
nix develop ./tools/nix#ci --command \
cargo fmt "$@"
cargo fmt "${fmt_args[@]}" "$@"

0 comments on commit b4caf58

Please sign in to comment.