From eddf8c42c84b93cdbe93f4d5ce23f56efb2b957a Mon Sep 17 00:00:00 2001 From: Jirka B Date: Mon, 16 Sep 2024 13:43:03 +0200 Subject: [PATCH] ROM --- .github/actions/download-ROM/action.yml | 33 +++++++++++++++++++++++++ .github/labeler.yml | 11 --------- .github/labeling-config.yml | 19 ++++++++++++++ .github/workflows/ci-tests.yml | 22 +---------------- .github/workflows/labeler.yml | 23 ++++++++++------- 5 files changed, 67 insertions(+), 41 deletions(-) create mode 100644 .github/actions/download-ROM/action.yml delete mode 100644 .github/labeler.yml create mode 100644 .github/labeling-config.yml diff --git a/.github/actions/download-ROM/action.yml b/.github/actions/download-ROM/action.yml new file mode 100644 index 0000000000..76f2b3602f --- /dev/null +++ b/.github/actions/download-ROM/action.yml @@ -0,0 +1,33 @@ +name: Prepare env. / restore caches +description: some more complex download-ROM - pip & hf + +runs: + using: "composite" + steps: + + - name: Setup macOS + if: runner.os == 'macOS' + run: | + brew update + brew install rar + shell: bash + - name: Setup Ubuntu + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y unrar + shell: bash + - name: Setup Windows + if: runner.os == 'Windows' + run: | + choco install unrar + shell: bash + + - name: Download ROMs + run: | + mkdir -p _datasets + cd _datasets + curl http://www.atarimania.com/roms/Roms.rar -o Roms.rar + unrar x -y Roms.rar + rm Roms.rar + shell: bash diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index a1b7bddb4a..0000000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,11 +0,0 @@ -documentation: - - docs/**/* - -callback: - - pl_bolts/callbacks/**/* - -datamodule: - - pl_bolts/datamodules/**/* - -model: - - pl_bolts/models/**/* diff --git a/.github/labeling-config.yml b/.github/labeling-config.yml new file mode 100644 index 0000000000..7085320fc6 --- /dev/null +++ b/.github/labeling-config.yml @@ -0,0 +1,19 @@ +documentation: + - changed-files: + - any-glob-to-any-file: + - docs/**/* + +callback: + - changed-files: + - any-glob-to-any-file: + - pl_bolts/callbacks/**/* + +datamodule: + - changed-files: + - any-glob-to-any-file: + - pl_bolts/datamodules/**/* + +model: + - changed-files: + - any-glob-to-any-file: + - pl_bolts/models/**/* diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 12dbfd9c65..9291dd625c 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -100,29 +100,9 @@ jobs: # bump this date if you need update cache key: datasets-20230630 - - name: Setup macOS - if: runner.os == 'macOS' && steps.cache-datasets.outputs.cache-hit != 'true' - run: | - brew update - brew install rar - - name: Setup Ubuntu - if: runner.os == 'Linux'&& steps.cache-datasets.outputs.cache-hit != 'true' - run: | - sudo apt-get update - sudo apt-get install -y unrar - - name: Setup Windows - if: runner.os == 'Windows'&& steps.cache-datasets.outputs.cache-hit != 'true' - run: | - choco install unrar - - name: Download ROMs if: steps.cache-datasets.outputs.cache-hit != 'true' - run: | - mkdir -p _datasets - cd _datasets - curl http://www.atarimania.com/roms/Roms.rar -o Roms.rar - unrar x -y Roms.rar - rm Roms.rar + uses: ./.github/actions/download-ROM - name: Init ROMs working-directory: _datasets/ diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index dcb9b5f4f9..ae7cc9a77f 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,13 +1,18 @@ -name: Labeler - -on: - pull_request_target: - types: [opened, reopened] +name: "Pull Request Labeler" +on: [pull_request_target] jobs: - triage: + triage-prs: + permissions: + contents: read + pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@main - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" + # Uploads repository content to the runner + - uses: actions/checkout@v4 + - uses: actions/labeler@v5 + with: + # The path to the label configuration file. + configuration-path: .github/labeling-config.yml + # Whether removing labels when matching files are reverted or no longer changed by the PR + sync-labels: true