From acc0fbe0286726b5333660e57d4194024ba6e717 Mon Sep 17 00:00:00 2001 From: Valentina Staneva Date: Tue, 12 Nov 2024 08:57:38 -0800 Subject: [PATCH] Update noise_processing.yml --- .github/workflows/noise_processing.yml | 42 +++++++++++++++++--------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/.github/workflows/noise_processing.yml b/.github/workflows/noise_processing.yml index c9162c7..652dfac 100644 --- a/.github/workflows/noise_processing.yml +++ b/.github/workflows/noise_processing.yml @@ -12,35 +12,47 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.9.18' + cache: 'pip' + cache-dependency-path: ambient_sound_analysis/requirements_noise.txt - name: Install Python dependencies run: | - python -m pip install -U pip - python -m pip install -U setuptools wheel - python -m pip install -r requirements_noise.txt + pip install -r ambient_sound_analysis/requirements_noise.txt - name: Install ffmpeg run: | - sudo apt-get update - sudo apt-get install ffmpeg - - # - name: Get latest timestamp - # run: | - # aws --no-sign-request s3 cp s3://streaming-orcasound-net/rpi_bush_point/latest.txt . - # read -r timestamp> $GITHUB_ENV + sudo apt-get update + sudo apt-get install ffmpeg + + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: ffmpeg - name: Create plots if: steps.cache.outputs.cache-hit != 'true' run: | - python noise_processing.py + python ambient_sound_analysis/noise_processing.py - - uses: stefanzweifel/git-auto-commit-action@v4 + - name: Upload to GitHub repo + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Commit to Github - file_pattern: 'img/*.png' + file_pattern: 'ambient_sound_analysis/img/broadband.png' + - name: Upload as artifact + uses: actions/upload-artifact@v4 + with: + name: ambient_sound_plots + path: ambient_sound_analysis/img/*.png + + # - name: Upload to Google Drive + # uses: AnimMouse/setup-rclone@v1 + # with: + # rclone_config: ${{secrets.RCLONE_CONFIG}} + # + # - run: | + # rclone copy ambient_sound_analysis/img/broadband.png mydrive:rclone_uploads/