@@ -2,8 +2,11 @@ name: Publish PGO
2
2
3
3
on :
4
4
push :
5
+ branches :
6
+ - master
5
7
tags :
6
8
- " *.*.*"
9
+ pull_request :
7
10
8
11
jobs :
9
12
publish :
@@ -22,32 +25,39 @@ jobs:
22
25
release_name : oha-windows-amd64-pgo.exe
23
26
target : x86_64-pc-windows-msvc
24
27
additional_args : " "
25
- - os : macos-latest
26
- artifact_name : oha
27
- release_name : oha-macos-amd64-pgo
28
- target : x86_64-apple-darwin
29
- additional_args : " "
30
- - os : macos-14
31
- artifact_name : oha
32
- release_name : oha-macos-arm64-pgo
33
- target : aarch64-apple-darwin
34
- additional_args : " "
28
+ # - os: macos-latest
29
+ # artifact_name: oha
30
+ # release_name: oha-macos-amd64-pgo
31
+ # target: x86_64-apple-darwin
32
+ # additional_args: ""
33
+ # - os: macos-14
34
+ # artifact_name: oha
35
+ # release_name: oha-macos-arm64-pgo
36
+ # target: aarch64-apple-darwin
37
+ # additional_args: ""
35
38
36
39
steps :
37
40
- uses : ilammy/setup-nasm@v1
38
41
- uses : actions/checkout@v4
39
42
- name : Install musl-tools on Linux
40
43
run : sudo apt-get update --yes && sudo apt-get install --yes musl-tools
41
44
if : contains(matrix.target, 'musl')
45
+ - uses : Swatinem/rust-cache@v2
42
46
- uses : dtolnay/rust-toolchain@stable
43
47
with :
44
48
targets : ${{ matrix.target }}
45
49
components : llvm-tools-preview
46
50
- run : cargo install cargo-pgo --version 0.2.8
47
51
- uses : oven-sh/setup-bun@v2
48
52
- run : bun run pgo.js --target ${{ matrix.target }} ${{ matrix.additional_args }}
53
+ - name : Upload
54
+ uses : actions/upload-artifact@v4
55
+ with :
56
+ name : ${{ matrix.release_name }}
57
+ path : target/${{ matrix.target }}/pgo/${{ matrix.artifact_name }}
49
58
- name : Upload binaries to release
50
59
uses : svenstaro/upload-release-action@v2
60
+ if : startsWith(github.ref, 'refs/tags/v')
51
61
with :
52
62
repo_token : ${{ secrets.GITHUB_TOKEN }}
53
63
file : target/${{ matrix.target }}/pgo/${{ matrix.artifact_name }}
0 commit comments