From e91cf6cec4f471d9c0c2e7d3e82efd90ab269945 Mon Sep 17 00:00:00 2001 From: aaravm Date: Tue, 9 Jul 2024 13:04:10 +0530 Subject: [PATCH 01/10] added ci --- .github/workflows/ci.yml | 66 +++++++++++++++++++++ .github/workflows/local.yml | 115 ++++++++++++++++++++++++++++++++++++ 2 files changed, 181 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/local.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..40ed117 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,66 @@ +name: GitHub CI/CD Workflow + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + container: + image: ubuntu:24.04 + env: + OPENSSL_DIR: /usr/include/openssl + OPENSSL_LIB_DIR: /usr/lib/x86_64-linux-gnu + OPENSSL_INCLUDE_DIR: /usr/include/openssl + + steps: + - name: Install dependencies + run: | + apt-get update + apt-get install -y curl git build-essential libssl-dev + + - uses: actions/checkout@v4 # checkout the repository + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + + - name: Install Node.js # required for build-models.sh + run: | + curl -fsSL https://deb.nodesource.com/setup_22.x | bash - + apt-get install -y nodejs + + - name: Set up JDK 11 # required for build-models.sh + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: '^1.22' + - name: Install Funnel + run: | + if [ -d "funnel" ]; then rm -Rf funnel; fi + git clone https://github.com/ohsu-comp-bio/funnel.git + cd funnel && make && make install && cd .. + - uses: actions/checkout@v4 # checkout the repository + - name: Build models + run: | + bash ./build-models.sh + - name: Build + run: | + cargo build --verbose + - name: Run tests + run: | + bash ./run-tests.sh + - name: Lint + run: | + cargo clippy -- -D warnings + - name: Format + run: | + cargo fmt -- ./lib/src/serviceinfo/models/*.rs # workaround to fix autogenerated code formatting + cargo fmt -- ./lib/src/tes/models/*.rs + cargo fmt -- --check \ No newline at end of file diff --git a/.github/workflows/local.yml b/.github/workflows/local.yml new file mode 100644 index 0000000..6d6775b --- /dev/null +++ b/.github/workflows/local.yml @@ -0,0 +1,115 @@ +name: Local CI/CD Workflow + +on: workflow_dispatch + +jobs: + build: + + runs-on: ubuntu-latest + container: + image: ubuntu:24.04 + env: + OPENSSL_DIR: /usr/include/openssl + OPENSSL_LIB_DIR: /usr/lib/x86_64-linux-gnu + OPENSSL_INCLUDE_DIR: /usr/include/openssl + + steps: + + - name: Cache Rust dependencies + uses: actions/cache@v3 + with: + path: ~/.cargo + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- + + - name: Cache Rust build output + uses: actions/cache@v3 + with: + path: target + key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-build- + + - name: Cache Node.js dependencies + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: ${{ runner.os }}-node- + + - name: Cache Maven dependencies + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- + + - name: Cache Go modules + uses: actions/cache@v3 + with: + path: ~/.cache/go-build + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + + - name: Cache Funnel dependencies + uses: actions/cache@v3 + with: + path: ~/funnel/build + key: ${{ runner.os }}-funnel-${{ hashFiles('**/funnel/*') }} + restore-keys: ${{ runner.os }}-funnel- + + - name: Install Rust + run: | + apt-get update + apt-get install -y curl git build-essential libssl-dev + if ! command -v rustup &> /dev/null # might not be installed while executing using `act` + then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + . $HOME/.cargo/env + fi + rustup update stable + + - name: Install Node.js # required for build-models.sh + run: | + curl -fsSL https://deb.nodesource.com/setup_22.x | bash - + apt-get install -y nodejs + + - name: Set up JDK 11 # required for build-models.sh + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: '^1.22' + - name: Install Funnel + run: | + if [ -d "funnel" ]; then rm -Rf funnel; fi + git clone https://github.com/ohsu-comp-bio/funnel.git + cd funnel && make && make install && cd .. + - uses: actions/checkout@v4 # checkout the repository + - name: Build models + run: | + . $HOME/.cargo/env + bash ./build-models.sh + - name: Build + run: | + . $HOME/.cargo/env + cargo build --verbose + - name: Run tests + run: | + . $HOME/.cargo/env + bash ./run-tests.sh + - name: Lint + run: | + . $HOME/.cargo/env + cargo clippy -- -D warnings + - name: Format + run: | + . $HOME/.cargo/env + # rustup install nightly – fails for some reason + # rustup default nightly + cargo fmt -- ./lib/src/serviceinfo/models/*.rs # workaround to fix autogenerated code formatting + cargo fmt -- ./lib/src/tes/models/*.rs + cargo fmt -- --check # --config-path ./rustfmt.toml \ No newline at end of file From e0d957ce54e1b4c2351d8465cc37ac0d2c153e92 Mon Sep 17 00:00:00 2001 From: aaravm Date: Tue, 9 Jul 2024 13:09:17 +0530 Subject: [PATCH 02/10] remove nodejs --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40ed117..177567f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,12 +25,6 @@ jobs: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - - name: Install Node.js # required for build-models.sh - run: | - curl -fsSL https://deb.nodesource.com/setup_22.x | bash - - apt-get install -y nodejs - - name: Set up JDK 11 # required for build-models.sh uses: actions/setup-java@v3 with: From b674c78e209546d1d418ff099dda47e552fb21b0 Mon Sep 17 00:00:00 2001 From: aaravm Date: Tue, 9 Jul 2024 13:11:24 +0530 Subject: [PATCH 03/10] remove nodejs --- .github/workflows/local.yml | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/local.yml b/.github/workflows/local.yml index 6d6775b..aac5962 100644 --- a/.github/workflows/local.yml +++ b/.github/workflows/local.yml @@ -29,13 +29,6 @@ jobs: key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }} restore-keys: ${{ runner.os }}-build- - - name: Cache Node.js dependencies - uses: actions/cache@v3 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: ${{ runner.os }}-node- - - name: Cache Maven dependencies uses: actions/cache@v3 with: @@ -57,21 +50,11 @@ jobs: key: ${{ runner.os }}-funnel-${{ hashFiles('**/funnel/*') }} restore-keys: ${{ runner.os }}-funnel- + - uses: actions/checkout@v4 # checkout the repository - name: Install Rust - run: | - apt-get update - apt-get install -y curl git build-essential libssl-dev - if ! command -v rustup &> /dev/null # might not be installed while executing using `act` - then - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - . $HOME/.cargo/env - fi - rustup update stable - - - name: Install Node.js # required for build-models.sh run: | - curl -fsSL https://deb.nodesource.com/setup_22.x | bash - - apt-get install -y nodejs + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Set up JDK 11 # required for build-models.sh uses: actions/setup-java@v3 From c6644c450f25f7ff1510e51792fc7f34155afe89 Mon Sep 17 00:00:00 2001 From: Pavel Nikonorov <4646953+pavelnikonorov@users.noreply.github.com> Date: Mon, 22 Jul 2024 17:14:39 +0400 Subject: [PATCH 04/10] remove commented commands --- .github/workflows/local.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/local.yml b/.github/workflows/local.yml index aac5962..59c007f 100644 --- a/.github/workflows/local.yml +++ b/.github/workflows/local.yml @@ -91,8 +91,6 @@ jobs: - name: Format run: | . $HOME/.cargo/env - # rustup install nightly – fails for some reason - # rustup default nightly cargo fmt -- ./lib/src/serviceinfo/models/*.rs # workaround to fix autogenerated code formatting cargo fmt -- ./lib/src/tes/models/*.rs cargo fmt -- --check # --config-path ./rustfmt.toml \ No newline at end of file From 178d6ae60f88849239ae7ed8f954e7ad85c3d81b Mon Sep 17 00:00:00 2001 From: aaravm Date: Sun, 4 Aug 2024 17:03:39 +0530 Subject: [PATCH 05/10] changing to cookiecutter like template --- .github/ISSUE_TEMPLATE/general-purpose.md | 49 ++++++++++++ .github/actions/ci.yml | 60 ++++++++++++++ .github/actions/local.yml | 98 +++++++++++++++++++++++ .github/actions/setup/poetry/action.yaml | 92 +++++++++++++++++++++ .github/workflows/code_quality.yaml | 77 ++++++++++++++++++ 5 files changed, 376 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/general-purpose.md create mode 100644 .github/actions/ci.yml create mode 100644 .github/actions/local.yml create mode 100644 .github/actions/setup/poetry/action.yaml create mode 100644 .github/workflows/code_quality.yaml diff --git a/.github/ISSUE_TEMPLATE/general-purpose.md b/.github/ISSUE_TEMPLATE/general-purpose.md new file mode 100644 index 0000000..6e29c73 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/general-purpose.md @@ -0,0 +1,49 @@ +Your issue may already be reported! Please search on the +[issue tracker][issue-tracker] before creating one. + +## Expected behavior + + + + + +## Current behavior + + + + + +## Possible solution + + + + + +## Context + + + + + +## Steps to reproduce (FOR BUGS) + + + + + +1. + +## Your environment (FOR BUGS) + + + +- Version used: +- Browser Name and version: +- Operating System and version (desktop or mobile): +- Link to your project: + +[issue-tracker]: https://github.com/elixir-cloud-aai/ga4gh-sdk/issues diff --git a/.github/actions/ci.yml b/.github/actions/ci.yml new file mode 100644 index 0000000..177567f --- /dev/null +++ b/.github/actions/ci.yml @@ -0,0 +1,60 @@ +name: GitHub CI/CD Workflow + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + container: + image: ubuntu:24.04 + env: + OPENSSL_DIR: /usr/include/openssl + OPENSSL_LIB_DIR: /usr/lib/x86_64-linux-gnu + OPENSSL_INCLUDE_DIR: /usr/include/openssl + + steps: + - name: Install dependencies + run: | + apt-get update + apt-get install -y curl git build-essential libssl-dev + + - uses: actions/checkout@v4 # checkout the repository + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Set up JDK 11 # required for build-models.sh + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: '^1.22' + - name: Install Funnel + run: | + if [ -d "funnel" ]; then rm -Rf funnel; fi + git clone https://github.com/ohsu-comp-bio/funnel.git + cd funnel && make && make install && cd .. + - uses: actions/checkout@v4 # checkout the repository + - name: Build models + run: | + bash ./build-models.sh + - name: Build + run: | + cargo build --verbose + - name: Run tests + run: | + bash ./run-tests.sh + - name: Lint + run: | + cargo clippy -- -D warnings + - name: Format + run: | + cargo fmt -- ./lib/src/serviceinfo/models/*.rs # workaround to fix autogenerated code formatting + cargo fmt -- ./lib/src/tes/models/*.rs + cargo fmt -- --check \ No newline at end of file diff --git a/.github/actions/local.yml b/.github/actions/local.yml new file mode 100644 index 0000000..aac5962 --- /dev/null +++ b/.github/actions/local.yml @@ -0,0 +1,98 @@ +name: Local CI/CD Workflow + +on: workflow_dispatch + +jobs: + build: + + runs-on: ubuntu-latest + container: + image: ubuntu:24.04 + env: + OPENSSL_DIR: /usr/include/openssl + OPENSSL_LIB_DIR: /usr/lib/x86_64-linux-gnu + OPENSSL_INCLUDE_DIR: /usr/include/openssl + + steps: + + - name: Cache Rust dependencies + uses: actions/cache@v3 + with: + path: ~/.cargo + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- + + - name: Cache Rust build output + uses: actions/cache@v3 + with: + path: target + key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-build- + + - name: Cache Maven dependencies + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- + + - name: Cache Go modules + uses: actions/cache@v3 + with: + path: ~/.cache/go-build + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + + - name: Cache Funnel dependencies + uses: actions/cache@v3 + with: + path: ~/funnel/build + key: ${{ runner.os }}-funnel-${{ hashFiles('**/funnel/*') }} + restore-keys: ${{ runner.os }}-funnel- + + - uses: actions/checkout@v4 # checkout the repository + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Set up JDK 11 # required for build-models.sh + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '11' + + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: '^1.22' + - name: Install Funnel + run: | + if [ -d "funnel" ]; then rm -Rf funnel; fi + git clone https://github.com/ohsu-comp-bio/funnel.git + cd funnel && make && make install && cd .. + - uses: actions/checkout@v4 # checkout the repository + - name: Build models + run: | + . $HOME/.cargo/env + bash ./build-models.sh + - name: Build + run: | + . $HOME/.cargo/env + cargo build --verbose + - name: Run tests + run: | + . $HOME/.cargo/env + bash ./run-tests.sh + - name: Lint + run: | + . $HOME/.cargo/env + cargo clippy -- -D warnings + - name: Format + run: | + . $HOME/.cargo/env + # rustup install nightly – fails for some reason + # rustup default nightly + cargo fmt -- ./lib/src/serviceinfo/models/*.rs # workaround to fix autogenerated code formatting + cargo fmt -- ./lib/src/tes/models/*.rs + cargo fmt -- --check # --config-path ./rustfmt.toml \ No newline at end of file diff --git a/.github/actions/setup/poetry/action.yaml b/.github/actions/setup/poetry/action.yaml new file mode 100644 index 0000000..36c4690 --- /dev/null +++ b/.github/actions/setup/poetry/action.yaml @@ -0,0 +1,92 @@ +# --- +# name: Setup Python and Poetry Action +# description: Configure system, Python, Poetry and deps and cache management. + +# inputs: +# os: +# default: ubuntu-latest +# description: The operating system to use +# python-version: +# default: '3.11' +# description: The version of Python to use +# poetry-version: +# default: '1.8.2' +# description: The version of Poetry to install +# poetry-install-options: +# default: '' +# description: Additional options to pass to poetry install +# poetry-export-options: +# default: '' +# description: Options to pass to poetry export for hash generation for cache +# invalidation + +# runs: +# using: composite +# steps: +# - uses: 'actions/setup-python@v5' +# id: setup-python +# with: +# python-version: '${{ inputs.python-version }}' + +# - name: Setup pipx environment Variables +# id: pipx-env-setup +# # pipx default home and bin dir are not writable by the cache action +# # so override them here and add the bin dir to PATH for later steps. +# # This also ensures the pipx cache only contains poetry +# run: | +# SEP="${{ !startsWith(runner.os, 'windows') && '/' || '\\' }}" +# PIPX_CACHE="${{ github.workspace }}${SEP}pipx_cache" +# echo "pipx-cache-path=${PIPX_CACHE}" >> $GITHUB_OUTPUT +# echo "pipx-version=$(pipx --version)" >> $GITHUB_OUTPUT +# echo "PIPX_HOME=${PIPX_CACHE}${SEP}home" >> $GITHUB_ENV +# echo "PIPX_BIN_DIR=${PIPX_CACHE}${SEP}bin" >> $GITHUB_ENV +# echo "PIPX_MAN_DIR=${PIPX_CACHE}${SEP}man" >> $GITHUB_ENV +# echo "${PIPX_CACHE}${SEP}bin" >> $GITHUB_PATH +# shell: bash + +# - name: Pipx cache +# id: pipx-cache +# uses: actions/cache@v4 +# with: +# path: ${{ steps.pipx-env-setup.outputs.pipx-cache-path }} +# key: ${{ runner.os }}-python- +# ${{ steps.setup-python.outputs.python-version }}- +# pipx-${{ steps.pipx-env-setup.outputs.pipx-version }}- +# poetry-${{ inputs.poetry-version }} + +# - name: Install poetry +# if: steps.pipx-cache.outputs.cache-hit != 'true' +# id: install-poetry +# shell: bash +# run: | +# pipx install poetry \ +# --python "${{ steps.setup-python.outputs.python-path }}" + +# - name: Read poetry cache location +# id: poetry-cache-location +# shell: bash +# run: | +# echo "poetry-venv-location=$(poetry config virtualenvs.path)" \ +# >> $GITHUB_OUTPUT + +# - name: Generate hash only for required deps +# run: | +# poetry export ${{ inputs.poetry-export-options }} \ +# --format=requirements.txt --output=requirements.txt +# echo "DEP_HASH=$(sha256sum requirements.txt | cut -d ' ' -f 1)" \ +# >> $GITHUB_ENV +# shell: bash + +# - uses: actions/cache@v4 +# name: Poetry cache +# with: +# path: ${{ steps.poetry-cache-location.outputs.poetry-venv-location }} +# key: ${{ runner.os }}-[python- +# ${{ steps.setup-python.outputs.python-version }}]-[ +# ${{ env.DEP_HASH }}]-[${{ inputs.poetry-install-options }}] + +# - name: 'Poetry install' +# if: steps.poetry-cache.outputs.cache-hit != 'true' +# shell: bash +# run: poetry install ${{ inputs.poetry-install-options }} --no-interaction +# ... diff --git a/.github/workflows/code_quality.yaml b/.github/workflows/code_quality.yaml new file mode 100644 index 0000000..b074b48 --- /dev/null +++ b/.github/workflows/code_quality.yaml @@ -0,0 +1,77 @@ +--- +name: Code quality + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + setup: + runs-on: ubuntu-latest + outputs: + cargo-path: ${{ steps.export-cargo-path.outputs.path }} + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + apt-get update + apt-get install -y curl git build-essential libssl-dev + + - name: Install Rust + id: install-rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Export cargo path + id: export-cargo-path + run: echo "path=$HOME/.cargo/bin" >> $GITHUB_OUTPUT + + lint: + needs: setup + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Rust + run: echo "$GITHUB_PATH" >> $GITHUB_PATH + + - name: Lint + run: cargo clippy -- -D warnings + + format: + needs: setup + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Rust + run: echo "$GITHUB_PATH" >> $GITHUB_PATH + + - name: Format + run: | + cargo fmt -- ./lib/src/serviceinfo/models/*.rs # workaround to fix autogenerated code formatting + cargo fmt -- ./lib/src/tes/models/*.rs + cargo fmt -- --check + + spell-check: + needs: setup + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Rust + run: echo "$GITHUB_PATH" >> $GITHUB_PATH + + - name: Check spellings + run: cargo spellcheck +... From cb80abebdfe39622e794bdd54fa31510885f72ae Mon Sep 17 00:00:00 2001 From: aaravm Date: Sun, 4 Aug 2024 17:06:19 +0530 Subject: [PATCH 06/10] adding docker container --- .github/workflows/code_quality.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/code_quality.yaml b/.github/workflows/code_quality.yaml index b074b48..e72b7df 100644 --- a/.github/workflows/code_quality.yaml +++ b/.github/workflows/code_quality.yaml @@ -10,6 +10,15 @@ on: - main jobs: + build: + runs-on: ubuntu-latest + container: + image: ubuntu:24.04 + env: + OPENSSL_DIR: /usr/include/openssl + OPENSSL_LIB_DIR: /usr/lib/x86_64-linux-gnu + OPENSSL_INCLUDE_DIR: /usr/include/openssl + setup: runs-on: ubuntu-latest outputs: From 064905f2e33e0d789c92a1d3bf348df4f1ec1383 Mon Sep 17 00:00:00 2001 From: aaravm Date: Sun, 4 Aug 2024 17:08:37 +0530 Subject: [PATCH 07/10] adding docker container --- .github/workflows/code_quality.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/code_quality.yaml b/.github/workflows/code_quality.yaml index e72b7df..e53010a 100644 --- a/.github/workflows/code_quality.yaml +++ b/.github/workflows/code_quality.yaml @@ -1,4 +1,3 @@ ---- name: Code quality on: @@ -83,4 +82,3 @@ jobs: - name: Check spellings run: cargo spellcheck -... From fa47384e5d017e9971fe91055da0e2011bb7dce5 Mon Sep 17 00:00:00 2001 From: aaravm Date: Mon, 5 Aug 2024 18:56:39 +0530 Subject: [PATCH 08/10] fixing ci/cd --- .github/workflows/code_quality.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code_quality.yaml b/.github/workflows/code_quality.yaml index e53010a..9fa23bf 100644 --- a/.github/workflows/code_quality.yaml +++ b/.github/workflows/code_quality.yaml @@ -17,6 +17,16 @@ jobs: OPENSSL_DIR: /usr/include/openssl OPENSSL_LIB_DIR: /usr/lib/x86_64-linux-gnu OPENSSL_INCLUDE_DIR: /usr/include/openssl + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + apt-get update + apt-get install -y curl git build-essential libssl-dev + - name: Build project + run: cargo build --release setup: runs-on: ubuntu-latest @@ -30,13 +40,11 @@ jobs: run: | apt-get update apt-get install -y curl git build-essential libssl-dev - - name: Install Rust id: install-rust run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: Export cargo path id: export-cargo-path run: echo "path=$HOME/.cargo/bin" >> $GITHUB_OUTPUT From 10716c23788ed4d1bf8be48fcda81418abf4d4fb Mon Sep 17 00:00:00 2001 From: aaravm Date: Mon, 5 Aug 2024 18:59:28 +0530 Subject: [PATCH 09/10] fixing ci/cd --- .github/workflows/code_quality.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/code_quality.yaml b/.github/workflows/code_quality.yaml index 9fa23bf..149c35d 100644 --- a/.github/workflows/code_quality.yaml +++ b/.github/workflows/code_quality.yaml @@ -30,6 +30,12 @@ jobs: setup: runs-on: ubuntu-latest + container: + image: ubuntu:24.04 + env: + OPENSSL_DIR: /usr/include/openssl + OPENSSL_LIB_DIR: /usr/lib/x86_64-linux-gnu + OPENSSL_INCLUDE_DIR: /usr/include/openssl outputs: cargo-path: ${{ steps.export-cargo-path.outputs.path }} steps: From 03da33154a615fef5b7e1ee68cd83082025b45ae Mon Sep 17 00:00:00 2001 From: aaravm Date: Mon, 5 Aug 2024 19:04:26 +0530 Subject: [PATCH 10/10] fixing ci/cd --- .github/workflows/code_quality.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/code_quality.yaml b/.github/workflows/code_quality.yaml index 149c35d..4779b97 100644 --- a/.github/workflows/code_quality.yaml +++ b/.github/workflows/code_quality.yaml @@ -25,6 +25,12 @@ jobs: run: | apt-get update apt-get install -y curl git build-essential libssl-dev + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + - name: Build project run: cargo build --release