From 3e0166db1fdeee1ecb12cc2ed79538d2c3ef9e9c Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Thu, 7 Jul 2022 14:06:10 +0200 Subject: [PATCH] TEST rm default workflows --- .github/workflows/Automerge.yml | 140 ------------------------ .github/workflows/Tests.yml | 95 ---------------- .github/workflows/update_conda_lock.yml | 16 --- 3 files changed, 251 deletions(-) delete mode 100644 .github/workflows/Automerge.yml delete mode 100644 .github/workflows/Tests.yml delete mode 100644 .github/workflows/update_conda_lock.yml diff --git a/.github/workflows/Automerge.yml b/.github/workflows/Automerge.yml deleted file mode 100644 index efd66f198b..0000000000 --- a/.github/workflows/Automerge.yml +++ /dev/null @@ -1,140 +0,0 @@ -name: Automerge - -concurrency: - group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -on: - push: - pull_request: - -jobs: - - - Pipeline: - if: ${{ !(github.event_name != 'pull_request' && github.actor == 'dependabot[bot]') }} - uses: ./.github/workflows/Tests.yml - - - GCS: - if: ${{ !(github.event_name != 'pull_request' && github.actor == 'dependabot[bot]') }} - needs: Pipeline - container: ubuntu:bionic - runs-on: - - self-hosted - - Linux - - X64 - - env: - MAX_CORES: 80 - GHA_EXTERNAL_DISK: "tools" - GHA_SA: "gh-sa-f4pga-arch-defs-ci" - - steps: - - - name: '📤 Download artifact: arch-defs packages' - uses: actions/download-artifact@v3 - with: - name: packages - path: './' - - - name: 🕐 Timestamp, Hash and packages.list - id: timestamp - run: | - TIMESTAMP="$(date +'%Y%m%d-%H%M%S')" - echo '::set-output name=timestamp::'"$TIMESTAMP" - - GITHUB_STEP_SUMMARY=${GITHUB_STEP_SUMMARY:-github_step_summary.md} - echo 'Timestamp: $TIMESTAMP' >> $GITHUB_STEP_SUMMARY - echo 'Hash: '"$(echo symbiflow-arch-defs*.tar.xz | sed 's/.*-\(.*\)\.tar\.xz/\1/')" >> $GITHUB_STEP_SUMMARY - - ls *.tar.xz > packages.list - - mkdir -p install - - - name: '🛠️ Setup Python and gsutil' - run: | - apt update -qqy - apt install -qqy curl python3 gnupg2 - echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list - curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - - apt update -qqy - apt install -qqy google-cloud-cli - - - name: 🚀 Upload to Google Cloud Storage (GCS) bucket - run: | - python3 - < TIMESTAMP: {TIMESTAMP}') - PACKAGE_RE = re_compile("symbiflow-arch-defs-([a-zA-Z0-9_-]+)-([a-z0-9])") - - def write_latest(package_name, timestamp, artifact): - with (Path("install") / f"symbiflow-{package_name}-latest").open("w") as wptr: - wptr.write( - 'https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/' - f'symbiflow-arch-defs/continuous/install/{TIMESTAMP}/{artifact}' - ) - - with (Path(__file__).parent.parent.parent / 'packages.list').open('r') as rptr: - for artifact in rptr.read().splitlines(): - if DO_UPLOAD: - check_call([ - 'gsutil', 'cp', str(artifact), - f'gs://symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/{TIMESTAMP}/' - ]) - m = PACKAGE_RE.match(artifact) - assert m, f"Package name not recognized! {artifact}" - package_name = m.group(1) - write_latest(package_name, TIMESTAMP, artifact) - if package_name == 'install-xc7': - write_latest('toolchain', TIMESTAMP, artifact) - if package_name == 'benchmarks-xc7': - write_latest('benchmarks', TIMESTAMP, artifact) - - if DO_UPLOAD: - run('gsutil -m rsync $* -r install gs://${{ secrets.GCP_STORAGE_BUCKET }}/', shell=True, check=False) - EOF - - - name: '📤 Upload artifact: latest' - uses: actions/upload-artifact@v3 - with: - name: latest - path: install - - - Assets: - if: ${{ !(github.event_name != 'pull_request' && github.actor == 'dependabot[bot]') && (github.event_name == 'push' && github.ref_name == 'main')}} - needs: GCS - runs-on: ubuntu-latest - - steps: - - - name: '📤 Download artifact: latest' - uses: actions/download-artifact@v3 - with: - name: latest - path: install - - - uses: pyTooling/Actions/releaser@r0 - with: - token: ${{ github.token }} - tag: latest - files: install/* - - - Automerge: - needs: Pipeline - if: github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' - runs-on: ubuntu-latest - name: Automerge dependabot PRs - permissions: - contents: write - - steps: - - - name: Auto-merge Dependabot PR - run: GITHUB_TOKEN='${{ github.token }}' gh pr merge '${{ github.event.pull_request.html_url }}' --squash diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml deleted file mode 100644 index e35db40b45..0000000000 --- a/.github/workflows/Tests.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Tests - -on: - workflow_call: - -jobs: - - - Test: - container: ubuntu:bionic - runs-on: - - self-hosted - - Linux - - X64 - - strategy: - fail-fast: false - matrix: - test: - - docs - - testarch - - tests - - ice40 - - xc7 - - xc7-vendor - - xc7a200t - - xc7a200t-vendor - - ql - - name: ${{ matrix.test }} - - env: - MAX_CORES: 80 - GHA_EXTERNAL_DISK: "tools" - - steps: - - - name: '🧰 Checkout' - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: '🚧 Execute test script' - run: stdbuf -i0 -o0 -e0 ./.github/scripts/${{ matrix.test }}.sh - - - name: '📤 Upload artifact: plots' - uses: actions/upload-artifact@v3 - if: always() - with: - name: f4pga-arch-defs-plots - path: '**/plot_*.svg' - - - Install: - container: ubuntu:bionic - runs-on: - - self-hosted - - Linux - - X64 - - strategy: - fail-fast: false - matrix: - fam: - - xc7 - - ql - - name: Install | ${{ matrix.fam }} - - env: - MAX_CORES: 80 - GHA_EXTERNAL_DISK: "tools" - - steps: - - - name: '🧰 Checkout' - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: '🚧 Execute test script' - run: stdbuf -i0 -o0 -e0 ./.github/scripts/install.sh '${{ matrix.fam }}' - - - name: '📤 Upload artifact: arch-defs packages' - uses: actions/upload-artifact@v3 - with: - name: packages - path: '*.tar.xz' - - - name: '📤 Upload artifact: plots' - uses: actions/upload-artifact@v3 - if: ${{ always() }} - with: - name: f4pga-arch-defs-plots - path: '**/plot_*.svg' diff --git a/.github/workflows/update_conda_lock.yml b/.github/workflows/update_conda_lock.yml deleted file mode 100644 index 8127af134e..0000000000 --- a/.github/workflows/update_conda_lock.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: update_conda_lock - -on: - push: - pull_request: - schedule: - - cron: '0 3 * * *' - workflow_dispatch: - -jobs: - - update-locks: - uses: f4pga/actions/.github/workflows/update_conda_lock.yml@main - secrets: - SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}