Skip to content

chore(deps): update devops-infra/action-commit-push action to v0.9.2 #1439

chore(deps): update devops-infra/action-commit-push action to v0.9.2

chore(deps): update devops-infra/action-commit-push action to v0.9.2 #1439

Workflow file for this run

name: "Test"
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
graalvm:
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Cache SBT
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: |
~/.cache/coursier
~/.ivy2/cache
~/.ivy2/local
~/.sbt/boot
~/.sbt/launchers
key: ${{ runner.os }}-sbt-${{ hashFiles('build.sbt', 'project/plugins.sbt') }}
- name: "Install Nix ❄"
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: "Install Cachix ❄"
uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
name: cbley
extraPullNames: pre-commit-hooks
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
pushFilter: '[-](source|nixpkgs-src)$'
- run: git branch PR-${{ github.event.number }}
- run: nix develop '.#graalVM' --command sbt 'scalalsJVM / GraalVMNativeImage / packageBin'
- run: jvm/target/graalvm-native-image/scalals
package:
name: Nix ❄
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 2
persist-credentials: false
- name: "Install Nix ❄"
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
- name: "Install Cachix ❄"
uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
name: cbley
extraPullNames: pre-commit-hooks
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
pushFilter: '[-](source|nixpkgs-src)$'
- name: Update scalals.dependencies hash
id: hash-update
if: github.event_name == 'pull_request' && github.repository == 'avdv/scalals'
run: |-
nix develop --command .github/update-hash scalals.dependencies
echo exit=$( git diff --quiet flake.nix ; echo $? ) >> "$GITHUB_OUTPUT"
- name: Set author identity and push url
run: |-
git config user.email '${{ github.actor }}@users.noreply.github.com'
git config user.name '${{ github.actor }}'
git remote set-url --push origin https://x-access-token:${{ secrets.PR_TOKEN }}@github.com/${{ github.repository }}
- name: Push changes to PR
if: steps.hash-update.outputs.exit != '0'
run: |-
git switch -c pr-branch ${{ github.event.pull_request.head.sha }}
git commit -m 'Update scalals.dependencies hash' flake.nix
git push origin HEAD:${{ github.head_ref }}
exit 1
- run: nix flake check
- run: nix build --print-build-logs
- run: nix run
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Cache SBT
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: |
~/.cache/coursier
~/.ivy2/cache
~/.ivy2/local
~/.sbt/boot
~/.sbt/launchers
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt', '.travis.yml') }}
- name: "Install Nix ❄"
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
with:
#install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
#install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
extra_nix_config: |
experimental-features = nix-command flakes
- name: "Install Cachix ❄"
uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
name: cbley
extraPullNames: pre-commit-hooks
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
pushFilter: '[-](source|nixpkgs-src)$'
# Only needed for private caches
#authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Determine zig env
run: |
nix develop --ignore-environment --keep HOME --command bash -c \
"( echo 'env<<EOF' ; zig env ; echo EOF ) >> '$GITHUB_OUTPUT'"
id: nix-zig
- name: Cache zig ${{ fromJson(steps.nix-zig.outputs.env).version }}
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: |
${{ fromJson(steps.nix-zig.outputs.env).global_cache_dir }}
key: zig-${{ fromJson(steps.nix-zig.outputs.env).zig_exe }}
restore-keys: |
zig-
- run: git branch PR-${{ github.event.number }}
- name: Test
run: nix develop --ignore-environment --keep HOME --command sbt tpolecatCiMode 'scalalsNative / test'
- name: Cross Compile
run: nix develop --ignore-environment --keep HOME --keep SCALANATIVE_MODE --command '.github/crosscompile'
env:
SCALANATIVE_MODE: ${{ github.ref == 'refs/heads/main' && 'release-full' || 'debug' }}
- name: qemu-aarch64 scalals
run: nix shell --inputs-from . 'nixpkgs#qemu' --command qemu-aarch64 scalals-linux-aarch64
- name: qemu-risc64 scalals
run: nix shell --inputs-from . 'nixpkgs#qemu' --command qemu-riscv64 scalals-linux-riscv64
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
path: scalals-*
run:
name: Run
strategy:
matrix:
os:
- ubuntu-latest
- macos-14
needs:
- tests
runs-on:
${{ matrix.os }}
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
id: download
- run: |
ls -lh
chmod +x scalals-*
working-directory: ${{steps.download.outputs.download-path}}/artifact
- run: ./scalals-${{ runner.os == 'Linux' && 'linux' || 'darwin' }}-x86_64
working-directory: ${{steps.download.outputs.download-path}}/artifact
- run: ./scalals-${{ runner.os == 'Linux' && 'linux' || 'darwin' }}-aarch64
if: ${{ runner.arch == 'ARM64' }}
working-directory: ${{steps.download.outputs.download-path}}/artifact
release:
name: Prepare release
if: github.ref == 'refs/heads/main'
needs:
- run
runs-on: ubuntu-latest
permissions:
# write permission is required to create a github release
contents: write
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
- name: Rename binaries
run: |
mv artifact/scalals-linux-aarch64 scalals-arm64-linux
mv artifact/scalals-linux-riscv64 scalals-riscv64-linux
mv artifact/scalals-linux-x86_64 scalals-x86_64-linux
mv artifact/scalals-darwin-aarch64 scalals-arm64-darwin
mv artifact/scalals-darwin-x86_64 scalals-x86_64-darwin
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # v6
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload binaries
run: |
gh release upload '${{ steps.release.outputs.tag_name }}' \
scalals-arm64-linux \
scalals-arm64-darwin \
scalals-riscv64-linux \
scalals-x86_64-linux \
scalals-x86_64-darwin \
--clobber --repo ${{ github.repository }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
benchmark:
name: Benchmark
if: github.ref == 'refs/heads/main'
needs:
- run
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
- name: ⚙ Install hyperfine
run: |-
sudo apt-get update
sudo apt-get install -y hyperfine
- run: |-
mv artifact/scalals-linux-x86_64 scalals-x86_64-linux
chmod +x scalals-x86_64-linux
- uses: bencherdev/bencher@main
- name: Track base branch benchmarks with Bencher
run: |
bencher run \
--project scalals \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch ${{ github.head_ref || github.ref_name }} \
--testbed ubuntu-latest \
--threshold-measure latency \
--threshold-test t_test \
--threshold-max-sample-size 64 \
--threshold-upper-boundary 0.99 \
--thresholds-reset \
--err \
--adapter shell_hyperfine \
--file ../results.json \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
"hyperfine -w 2 --export-json ../results.json './scalals-x86_64-linux --tree --color'"