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 4513fb1
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 54 deletions.
107 changes: 54 additions & 53 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,64 +16,65 @@ on:
jobs:
format:
runs-on: ubuntu-latest
container:
image: ghcr.io/sdsc-ordes/rdf-protect:ci-format-1.0.0
# container:
# image: ghcr.io/sdsc-ordes/rdf-protect:ci-format-1.0.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 1 - format
uses: docker://ghcr.io/sdsc-ordes/rdf-protect:ci-format-1.0.0
run: |
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 @@ -8,4 +8,7 @@ ROOT_DIR=$(git rev-parse --show-toplevel)

# ci_container_mgr_setup

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

unset ROOT_DIR
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 4513fb1

Please sign in to comment.