From 0ae4cbb5ff307894addfa36e39216bd0ed62d93d Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Mon, 31 Jan 2022 15:05:24 +0000 Subject: [PATCH 1/2] Add minified cpuinfo to stripping --- tools/strip.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/strip.sh b/tools/strip.sh index 8848d41..b1f0c2b 100644 --- a/tools/strip.sh +++ b/tools/strip.sh @@ -2,3 +2,4 @@ rm -rfv 3rd-party/ruy/third_party/googletest/ rm -rfv extras +(cd 3rd-party/ruy/third_party/cpuinfo/ && git pull https://github.com/browsermt/cpuinfo) From 25a17249228e3a2d1b27dc3d6d1e983674bf6e5f Mon Sep 17 00:00:00 2001 From: Jerin Philip Date: Mon, 31 Jan 2022 15:31:55 +0000 Subject: [PATCH 2/2] Automation Polishing Add master to workflow builds Strip before release, only ARM requirement, upload github workspace Recusive checkout clone, source tarball Remove .git and .github folders Removing .gitmodules as well, need folder name in tarball Removing all .git files/folders Disable x86 strip Fix comment positioning Only activate release on push to master Fix permissions for workflow Toggle on pushes only to master --- .github/workflows/moz-target.yml | 34 +++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/moz-target.yml b/.github/workflows/moz-target.yml index 06c2e45..5363c55 100644 --- a/.github/workflows/moz-target.yml +++ b/.github/workflows/moz-target.yml @@ -3,6 +3,7 @@ name: "Strip for gecko-dev" push: branches: - main + - master tags: - "v*.*.*" pull_request: @@ -22,6 +23,7 @@ jobs: x86: name: "x86" runs-on: "ubuntu-latest" + if: false steps: - name: Checkout uses: actions/checkout@v2 @@ -186,11 +188,33 @@ jobs: release-latest: name: Release Latest Build runs-on: ubuntu-latest - needs: [x86, arm] - # if: github.ref == 'refs/heads/master' + needs: [arm] + if: github.ref == 'refs/heads/master' + permissions: + id-token: "write" + contents: "write" + packages: "write" + pull-requests: "read" + steps: - - name: Download artifacts - uses: actions/download-artifact@v2 + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Strip unnecessary sources + run: | + bash tools/strip.sh + # Additionally remove .github only and .git folders. + - name: "Strip other files: .git, .github" + run: | + rm -rv .github + find . -iname ".git" | xargs -I% rm -rfv % + find . -iname ".gitmodules" | xargs -I% rm -rfv % + + - name: Create source-tarball + run: | + (cd ../ && tar cvzf /tmp/MozIntGemm.tar.gz MozIntGemm) - name: Update GitHub prerelease uses: marvinpinto/action-automatic-releases@latest @@ -200,4 +224,4 @@ jobs: prerelease: true title: "Latest Build" files: | - ${{github.workspace}}/artifact/*.whl + /tmp/MozIntGemm.tar.gz