milahu / sccache-bin

0 stars 0 forks source link

update .github/workflows/gh-pages.yml #1

Open milahu opened 2 years ago

milahu commented 2 years ago

not committing, to avoid rebuild of sccache.exe

new version of .github/workflows/gh-pages.yml

```yml # .github/workflows/gh-pages.yml # cache binary artifact on github pages # workaround for # cache not restored on different PRs https://github.com/actions/cache/issues/692 # Please provide a new release https://github.com/mozilla/sccache/issues/1019 # similar https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts # based on https://github.com/mozilla/sccache/blob/main/.github/workflows/ci.yml # based on https://github.com/mixxxdj/mixxx/blob/main/.github/workflows/build.yml name: Build to GH Pages on: push: pull_request: jobs: build: strategy: fail-fast: false matrix: include: - name: Windows 2019 (MSVC) os: windows-2019 # TODO: Re-enable FFmpeg after licensing issues have been clarified # Attention: If you change the cmake_args for the Windows CI build, # also adjust the for the local Windows build setup in # ./tools/windows_buildenv.bat cmake_args: >- -DBULK=OFF -DFFMPEG=OFF -DHSS1394=ON -DLOCALECOMPARE=ON -DMAD=ON -DMEDIAFOUNDATION=ON -DMODPLUG=ON -DWAVPACK=ON cc: cl cxx: cl # TODO: Fix these broken tests on Windows ctest_args: --exclude-regex '^AutoDJProcessorTest.*$' cpack_generator: WIX compiler_cache: sccache compiler_cache_path: C:\Users\runneradmin\AppData\Local\Mozilla\sccache\cache buildenv_basepath: C:\buildenv buildenv_script: tools/windows_buildenv.bat artifacts_name: Windows Installer artifacts_path: build/*.msi artifacts_slug: windows-win64 qt_qpa_platform: windows env: SCCACHE_COMMIT: 3f318a8675e4c3de4f5e8ab2d086189f2ae5f5cf runs-on: ${{ matrix.os }} name: ${{ matrix.name }} container: ${{ matrix.container }} outputs: artifact-macos-macosintel: ${{ steps.prepare_deploy.outputs.artifact-macos-macosintel }} artifact-windows-win64: ${{ steps.prepare_deploy.outputs.artifact-windows-win64 }} steps: # selecting a toolchain either by action or manual `rustup` calls should happen # before the plugin, as it uses the current rustc version as its cache key - name: "install rust" uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable - name: "setup rust cache" uses: Swatinem/rust-cache@v1 # https://github.com/Swatinem/rust-cache # has no effect? # on commit 0f15266c1b4199719671a0d068935597fd37d07a # Using keys: # v0-rust-build-1.58.1-x86_64-pc-windows-msvc-db9d1b20bba1-da39a3ee5e6b4b0d3255 # v0-rust-build-1.58.1-x86_64-pc-windows-msvc-db9d1b20bba1 # No cache found. # not implemented # https://github.com/actions-rs/install/issues/10 # - name: "build with actions-rs/install" # uses: actions-rs/install@v0.1 # with: # crate: --git https://github.com/mozilla/sccache.git --rev "${SCCACHE_COMMIT}" # version: latest # use-tool-cache: true # sccache's handling of the /fp:fast MSVC compiler option is broken, so use our fork with the fix. # https://github.com/mozilla/sccache/issues/950 - name: Build shell: bash # TODO: change this to simply `cargo install sccache` after 0.2.16 has been released run: cargo install --git https://github.com/mozilla/sccache.git --rev "${SCCACHE_COMMIT}" # Finished release [optimized] target(s) in 9m 38s # Installing C:\Users\runneradmin\.cargo\bin\sccache.exe # Installed package `sccache v0.2.16-alpha.0 (https://github.com/mozilla/sccache.git?rev=3f318a8675e4c3de4f5e8ab2d086189f2ae5f5cf#3f318a86)` (executable `sccache.exe`) - name: Copy shell: bash run: | set -x # bash xtrace pwd # /d/a/sccache-bin/sccache-bin find /c/Users/runneradmin/.cargo/bin # list all exe files mkdir public ( cd public cp /c/Users/runneradmin/.cargo/bin/sccache.exe ./ stat sccache.exe sha256sum sccache.exe >sccache.exe.sha256 cat sccache.exe.sha256 find . >index.html ) - name: Deploy uses: peaceiris/actions-gh-pages@v3 # https://github.com/marketplace/actions/github-pages-action if: ${{ github.ref == 'refs/heads/main' }} with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./public ```

example use

wget https://milahu.github.io/sccache-bin/sccache.exe
echo "da8cce04ad988ebfe44efe6d45f9e7636f4a609a3aee4a280463ac5c539e2827 sccache.exe" >sccache.exe.sha256
sha256sum -c sccache.exe.sha256 || exit 1
mv sccache.exe /c/Users/runneradmin/.cargo/bin/
milahu commented 2 years ago

@sylvestre "thanks" for deleting my post (how to make your own release of sccache) mozilla really does have a problem with free speech ...

@Be-ing why? its a workaround for https://github.com/actions/cache/issues/692 if you need a different sccache commit, just fork my repo

Be-ing commented 2 years ago

This is not a release by any meaning of the word I've ever heard. You've just created a build, unless you're proposing to fork sccache, in which case it would need a new name.

milahu commented 2 years ago

what is missing?

in the simplest case, it should work when you download the binary to /c/Users/runneradmin/.cargo/bin/sccache.exe

Be-ing commented 2 years ago

Please stop bothering me, this whole bizarre incident has already been stressful for no good reason. I'm unsubscribing now.

milahu commented 2 years ago

snowflakes everywhere : D