From 5901eb65771177e37a8bae1f286d6def62c50bb2 Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Mon, 24 Jul 2023 14:17:44 +0200 Subject: [PATCH] Install actionlint (GitHub Action workflow linter) (#1408) --- .github/workflows/android-ci.yml | 2 +- .github/workflows/android-release.yml | 4 +-- .github/workflows/gh-pages-ios-api.yml | 37 ------------------------ .github/workflows/ios-pre-release.yml | 2 +- .github/workflows/ios-render-test.yml | 2 +- .github/workflows/macos-ci.yml | 40 -------------------------- .github/workflows/node-ci-mac.yml | 2 -- .pre-commit-config.yaml | 6 +++- 8 files changed, 10 insertions(+), 85 deletions(-) diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index 010394da2..27b4a321d 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -209,7 +209,7 @@ jobs: needs: build runs-on: ubuntu-latest - if: secrets.AWS_ACCESS_KEY_ID && secrets.AWS_SECRET_ACCESS_KEY + if: github.repository_owner == 'maplibre' steps: - uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index 4b982c9f9..d1ad07b4f 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -117,8 +117,8 @@ jobs: run: | RELEASE_NOTES_PATH="${PWD}/release_notes.txt" ./scripts/release-notes.js > ${RELEASE_NOTES_PATH} - echo ::set-output name=release_notes::${RELEASE_NOTES_PATH} - echo ::set-output name=version_tag::$( git describe --tags --match=android-v*.*.* --abbrev=0 ) + echo release_notes=${RELEASE_NOTES_PATH} >> "$GITHUB_OUTPUT" + echo version_tag=$( git describe --tags --match=android-v*.*.* --abbrev=0 ) >> "$GITHUB_OUTPUT" shell: bash - name: Create release diff --git a/.github/workflows/gh-pages-ios-api.yml b/.github/workflows/gh-pages-ios-api.yml index 84fc1c0f5..eccacf30f 100644 --- a/.github/workflows/gh-pages-ios-api.yml +++ b/.github/workflows/gh-pages-ios-api.yml @@ -22,49 +22,12 @@ jobs: submodules: recursive fetch-depth: 0 - - name: Install macos dependencies - run: | - brew list cmake || brew install cmake - brew list ccache || brew install ccache - brew list pkg-config || brew install pkg-config - brew list glfw3 || brew install glfw3 - - - name: Cache node modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - path: /user/local/lib/node_modules - key: ${{ runner.macos }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.macos }}-build-${{ env.cache-name }}- - ${{ runner.macos }}-build- - ${{ runner.macos }}- - - name: npm install run: npm install --ignore-scripts - name: Prepare ccache run: ccache --clear - - name: Cache ccache - uses: actions/cache@v3 - env: - cache-name: ccache-v1 - with: - path: ~/.ccache' - key: ${{ env.cache-name }}-${{ runner.macos }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} - restore-keys: | - ${{ env.cache-name }}-${{ runner.macos }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} - ${{ env.cache-name }}-${{ runner.macos }}-${{ github.job }}-${{ github.ref }} - ${{ env.cache-name }}-${{ runner.macos }}-${{ github.job }} - - - name: Clear ccache statistics - run: | - ccache --zero-stats - ccache --max-size=2G - ccache --show-stats - - name: Build docs run: make idocument diff --git a/.github/workflows/ios-pre-release.yml b/.github/workflows/ios-pre-release.yml index eb56b4aa8..a272b1411 100644 --- a/.github/workflows/ios-pre-release.yml +++ b/.github/workflows/ios-pre-release.yml @@ -6,7 +6,7 @@ on: jobs: build: #runs-on: macos-12 - runs-on: [self-hosted, petr] + runs-on: [self-hosted] env: BUILDTYPE: Release HOMEBREW_NO_AUTO_UPDATE: 1 diff --git a/.github/workflows/ios-render-test.yml b/.github/workflows/ios-render-test.yml index cb1136e18..514b99a8c 100644 --- a/.github/workflows/ios-render-test.yml +++ b/.github/workflows/ios-render-test.yml @@ -9,7 +9,7 @@ on: jobs: ios-render-test: runs-on: ubuntu-22.04 - if: secrets.MAPLIBRE_NATIVE_BOT_APP_ID + if: github.repository_owner == 'maplibre' steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index 65bba7613..e6da3393a 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -71,25 +71,6 @@ jobs: submodules: recursive fetch-depth: 0 - - name: Install macos dependencies - run: | - brew list cmake || brew install cmake - brew list ccache || brew install ccache - brew list pkg-config || brew install pkg-config - brew list glfw || brew install glfw - - - name: Cache node modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - path: /user/local/lib/node_modules - key: ${{ runner.macos }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.macos }}-build-${{ env.cache-name }}- - ${{ runner.macos }}-build- - ${{ runner.macos }}- - - uses: actions/setup-node@v3 with: node-version: 18 @@ -97,27 +78,6 @@ jobs: - name: npm install run: npm ci --ignore-scripts - - name: Prepare ccache - run: ccache --clear - - - name: Cache ccache - uses: actions/cache@v3 - env: - cache-name: ccache-v1 - with: - path: ~/.ccache' - key: ${{ env.cache-name }}-${{ runner.macos }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} - restore-keys: | - ${{ env.cache-name }}-${{ runner.macos }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} - ${{ env.cache-name }}-${{ runner.macos }}-${{ github.job }}-${{ github.ref }} - ${{ env.cache-name }}-${{ runner.macos }}-${{ github.job }} - - - name: Clear ccache statistics - run: | - ccache --zero-stats - ccache --max-size=2G - ccache --show-stats - - name: Run macOS Objective-C tests run: | ../macos/scripts/run-in-macos-gui-env.sh "make macos-test" diff --git a/.github/workflows/node-ci-mac.yml b/.github/workflows/node-ci-mac.yml index 92dc0ec2e..612e3e47c 100644 --- a/.github/workflows/node-ci-mac.yml +++ b/.github/workflows/node-ci-mac.yml @@ -73,8 +73,6 @@ jobs: include: - runs-on: macos-12 arch: x86_64 - - runs-on: macos-12-arm - arch: arm64 continue-on-error: true env: BUILDTYPE: 'Release' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 42c581ee2..e1d2cc1c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,10 @@ repos: rev: 6.1.0.2 hooks: - id: buildifier +- repo: https://github.com/rhysd/actionlint + rev: v1.6.25 + hooks: + - id: actionlint ci: # sometimes fails https://github.com/keith/pre-commit-buildifier/issues/13 - skip: [buildifier] + skip: [buildifier] \ No newline at end of file