Skip to content

Commit 6c76a13

Browse files
committed
chore: add arm
1 parent bea2253 commit 6c76a13

3 files changed

Lines changed: 61 additions & 25 deletions

File tree

.github/workflows/build.yaml

Lines changed: 61 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,83 @@ on:
66
- "main"
77
workflow_dispatch:
88

9+
concurrency:
10+
group: build
11+
cancel-in-progress: true
12+
913
jobs:
10-
build-push-and-release:
11-
runs-on: ubuntu-latest
14+
build-amd64:
15+
runs-on: ubuntu-24.04
1216
steps:
13-
- uses: actions/checkout@v4
14-
17+
- name: Check out the repo
18+
uses: actions/checkout@v4
1519
- name: Set up Docker Buildx
1620
uses: docker/setup-buildx-action@v3
17-
18-
- name: Login to GitHub Container Registry
21+
- name: Log in to GitHub Docker Registry
1922
uses: docker/login-action@v3
2023
with:
2124
registry: ghcr.io
2225
username: ${{ github.actor }}
2326
password: ${{ secrets.GITHUB_TOKEN }}
24-
25-
- name: Build and Push Docker image
27+
- name: Build and push AMD64 image
2628
uses: docker/build-push-action@v6
2729
with:
30+
context: .
31+
file: ./Dockerfile
2832
push: true
33+
platforms: linux/amd64
34+
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/demo-parser:buildcache-amd64
35+
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/demo-parser:buildcache-amd64,mode=max
2936
tags: |
30-
ghcr.io/${{ github.repository_owner }}/demo-parser:latest
31-
ghcr.io/${{ github.repository_owner }}/demo-parser:${{ github.sha }}
32-
cache-from: |
33-
type=registry,ref=ghcr.io/${{ github.repository_owner }}/demo-parser:buildcache
34-
cache-to: |
35-
type=registry,ref=ghcr.io/${{ github.repository_owner }}/demo-parser:buildcache,mode=max
36-
37+
ghcr.io/${{ github.repository_owner }}/demo-parser:latest-amd64
38+
ghcr.io/${{ github.repository_owner }}/demo-parser:${{ github.sha }}-amd64
39+
build-arm64:
40+
runs-on: ubuntu-24.04-arm
41+
steps:
42+
- name: Check out the repo
43+
uses: actions/checkout@v4
44+
- name: Set up Docker Buildx
45+
uses: docker/setup-buildx-action@v3
46+
- name: Log in to GitHub Docker Registry
47+
uses: docker/login-action@v3
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.actor }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
- name: Build and push ARM64 image
53+
uses: docker/build-push-action@v6
54+
with:
55+
context: .
56+
file: ./Dockerfile
57+
push: true
58+
platforms: linux/arm64
59+
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/demo-parser:buildcache-arm64
60+
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/demo-parser:buildcache-arm64,mode=max
61+
tags: |
62+
ghcr.io/${{ github.repository_owner }}/demo-parser:latest-arm64
63+
ghcr.io/${{ github.repository_owner }}/demo-parser:${{ github.sha }}-arm64
64+
merge:
65+
needs: [build-amd64, build-arm64]
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Log in to GitHub Docker Registry
69+
uses: docker/login-action@v3
70+
with:
71+
registry: ghcr.io
72+
username: ${{ github.actor }}
73+
password: ${{ secrets.GITHUB_TOKEN }}
74+
- name: Create manifest list and push
75+
run: |
76+
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/demo-parser:latest \
77+
ghcr.io/${{ github.repository_owner }}/demo-parser:latest-amd64 \
78+
ghcr.io/${{ github.repository_owner }}/demo-parser:latest-arm64
79+
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/demo-parser:${{ github.sha }} \
80+
ghcr.io/${{ github.repository_owner }}/demo-parser:${{ github.sha }}-amd64 \
81+
ghcr.io/${{ github.repository_owner }}/demo-parser:${{ github.sha }}-arm64
3782
- name: Delete Package Versions
3883
uses: actions/delete-package-versions@v5
3984
with:
4085
package-name: demo-parser
4186
package-type: container
42-
min-versions-to-keep: 8
87+
min-versions-to-keep: 9
4388
ignore-versions: '^buildcache-*'

internal/parser/grenades.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ func (s *state) onGrenadeProjectileThrow(e events.GrenadeProjectileThrow) {
2222
return
2323
}
2424
pos := e.Projectile.Position()
25-
// CS2 demos sometimes report (0,0,0) for the projectile entity on
26-
// the very tick it spawns — the entity is created but its origin
27-
// hasn't synced yet. Fall back to the thrower's position so the
28-
// throw doesn't get plotted at the map origin.
2925
if (pos.X == 0 && pos.Y == 0) && thrower != nil {
3026
tp := thrower.Position()
3127
pos.X = tp.X

internal/parser/types.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,6 @@ type EventPosition struct {
118118
HasDefuser bool `json:"has_defuser,omitempty"`
119119
}
120120

121-
// EventRoundInventory captures what a player is carrying at the moment
122-
// freeze-time ends (i.e. right after the buy phase). Grenade counts are
123-
// used downstream to compute "unused utility $". Primary/secondary
124-
// weapon, armor, and defuse-kit are surfaced in the 2D replay viewer so
125-
// a coach can see each player's round loadout next to their name.
126121
type EventRoundInventory struct {
127122
Round int `json:"round,omitempty"`
128123
AttackerSteamID string `json:"attacker,omitempty"`

0 commit comments

Comments
 (0)