Skip to content

Commit

Permalink
fix: add pip dependencies requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
z1turn0 committed Jan 31, 2024
1 parent c2798d2 commit 521e458
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 31 deletions.
41 changes: 22 additions & 19 deletions .github/workflows/check-all-loser-homework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,21 @@ jobs:
cxx_compiler: g++-13

steps:
- uses: actions/checkout@v4

- name: Install python-slugigy
run: |
pip install python-slugify[unidecode]
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- run: pip install -r requirements.txt

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=$cxx_compiler
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=$cxx_compiler

- name: Build
run: cmake --build ${{github.workspace}}/build --target build_loser_homework
- name: Build
run: cmake --build ${{github.workspace}}/build --target build_loser_homework

- name: Check run
run: cmake --build ${{github.workspace}}/build --target run_loser_homework
- name: Check run
run: cmake --build ${{github.workspace}}/build --target run_loser_homework

check-in-clang:
runs-on: ubuntu-latest
Expand All @@ -52,16 +53,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- run: pip install -r requirements.txt

- name: Install clang 17
run: |
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
echo | sudo ./llvm.sh 17
- name: Install python-slugigy
run: |
pip install python-slugify[unidecode]
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=$cxx_compiler
Expand All @@ -77,10 +79,11 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Install python-slugigy
run: |
pip install python-slugify[unidecode]
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- run: pip install -r requirements.txt

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/check-changed-loser-homework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- run: pip install -r requirements.txt

- name: Only keep cpp changed files
if: needs.get-changed-files.outputs.any_changed == 'true'
Expand All @@ -73,10 +78,6 @@ jobs:
echo $find_command
eval "$find_command"
find ${{ env.src_path }} -type f \( -name "*.cpp" -o -name "*.cxx" -o -name "*.cc" \)
- name: Install python-slugigy
run: |
pip install python-slugify[unidecode]
- name: Configure CMake
if: needs.get-changed-files.outputs.any_changed == 'true'
Expand All @@ -98,6 +99,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- run: pip install -r requirements.txt

- name: Only keep cpp changed files
if: needs.get-changed-files.outputs.any_changed == 'true'
Expand All @@ -121,10 +127,6 @@ jobs:
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
echo | sudo ./llvm.sh 17
- name: Install python-slugigy
run: |
pip install python-slugify[unidecode]
- name: Configure CMake
if: needs.get-changed-files.outputs.any_changed == 'true'
Expand All @@ -144,6 +146,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- run: pip install -r requirements.txt

- name: Only keep cpp changed files
if: needs.get-changed-files.outputs.any_changed == 'true'
Expand All @@ -167,10 +174,6 @@ jobs:
}
}
- name: Install python-slugigy
run: |
pip install python-slugify[unidecode]
- name: Configure CMake
if: needs.get-changed-files.outputs.any_changed == 'true'
run: cmake -B ${{github.workspace}}/build
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python-slugify>=7.0.0

1 comment on commit 521e458

@rsp4jack
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job ❤️

Please sign in to comment.