@@ -34,96 +34,27 @@ jobs:
3434 cli-artifacts :
3535 name : pyroscope-cli - build aritifacts
3636 needs : cli-release
37- runs-on : ${{ matrix.os }}
38- env :
39- # For some builds, we use cross to test on 32-bit and big-endian
40- # systems.
41- CARGO : cargo
42- # When CARGO is set to CROSS, this is set to `--target matrix.target`.
43- TARGET_FLAGS : " "
44- # When CARGO is set to CROSS, TARGET_DIR includes matrix.target.
45- TARGET_DIR : ./target
46- # Emit backtraces on panics.
47- RUST_BACKTRACE : 1
48- strategy :
49- matrix :
50- build : [linux, linux-arm, macos]
51- # todo build everything in docker, use 18.04, do not depend on gh runners
52- include :
53- - build : linux
54- os : ubuntu-20.04
55- rust : stable
56- target : x86_64-unknown-linux-musl
57- - build : linux-arm
58- os : ubuntu-20.04
59- rust : stable
60- target : arm-unknown-linux-gnueabihf
61- - build : macos
62- os : macos-latest
63- rust : stable
64- target : x86_64-apple-darwin
37+ runs-on : ubunut-22.04
6538 steps :
66- - name : Checkout repository
67- uses : actions/checkout@v3
39+ - uses : actions/checkout@v3
6840 with :
6941 submodules : recursive
70-
71- - name : Install packages (Ubuntu)
72- if : matrix.os == 'ubuntu-18.04'
73- run : |
74- ci/ubuntu-install-packages
75-
76- - name : Install packages (macOS)
77- if : matrix.os == 'macos-latest'
78- run : |
79- ci/macos-install-packages
80-
81- - name : Install Rust
82- uses : actions-rs/toolchain@v1
42+ - uses : docker/login-action@v2
43+ name : Login to Docker Hub
8344 with :
84- toolchain : ${{ matrix.rust }}
85- profile : minimal
86- override : true
87- target : ${{ matrix.target }}
88-
89- - name : Use Cross
90- shell : bash
91- run : |
92- cargo install cross
93- echo "CARGO=cross" >> $GITHUB_ENV
94- echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
95- echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV
96-
97- - name : Show command used for Cargo
98- run : |
99- echo "cargo command is: ${{ env.CARGO }}"
100- echo "target flag is: ${{ env.TARGET_FLAGS }}"
101- echo "target dir is: ${{ env.TARGET_DIR }}"
102-
103- - name : Build release binary
104- run : ${{ env.CARGO }} build --manifest-path pyroscope_cli/Cargo.toml --verbose --release ${{ env.TARGET_FLAGS }}
105-
106- - name : Strip release binary (linux and macos)
107- if : matrix.build == 'linux' || matrix.build == 'macos'
108- run : strip "pyroscope_cli/target/${{ matrix.target }}/release/pyroscope-cli"
109-
110- - name : Strip release binary (arm)
111- if : matrix.build == 'linux-arm'
112- run : |
113- docker run --rm -v \
114- "$PWD/target:/target:Z" \
115- rustembedded/cross:arm-unknown-linux-gnueabihf \
116- arm-linux-gnueabihf-strip \
117- /target/arm-unknown-linux-gnueabihf/release/pyroscope-cli
45+ username : ${{ secrets.DOCKERHUB_USERNAME }}
46+ password : ${{ secrets.DOCKERHUB_PASSWORD }}
47+ - run : DOCKER_EXTRA="--push" make cli/docker-image
48+ - run : DOCKER_EXTRA="--output=." make cli/docker-image
11849
11950 - name : Upload release archive
1205112152 env :
12253 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12354 with :
12455 upload_url : ${{ needs.cli-release.outputs.upload_url }}
125- asset_path : " pyroscope_cli/target/${{ matrix.target }}/release /pyroscope-cli"
126- asset_name : " pyroscope-cli-${{ matrix.target }} "
56+ asset_path : " . /pyroscope-cli"
57+ asset_name : " pyroscope-cli"
12758 asset_content_type : application/octet-stream
12859 pprofrs-release :
12960 name : pyroscope-pprofrs
0 commit comments