Skip to content

Commit 8c1524c

Browse files
committed
wip
1 parent 51b3ae1 commit 8c1524c

File tree

3 files changed

+62
-20
lines changed

3 files changed

+62
-20
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,54 @@ jobs:
3333
# env:
3434
# CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
3535
# run: cargo caw-publish
36+
cargo_build:
37+
needs: tests
38+
name: Cargo - Building Artifacts
39+
runs-on: ubuntu-latest
40+
strategy:
41+
matrix:
42+
build:
43+
- linux gnu x86_64
44+
- linux musl x64
45+
include:
46+
- build: linux musl x64
47+
os: ubuntu-latest
48+
rust: stable
49+
rust_target: x86_64-unknown-linux-musl
50+
- build: linux gnu x86_64
51+
os: ubuntu-latest
52+
rust: stable
53+
rust_target: x86_64-unknown-linux-gnu
54+
steps:
55+
- name: Checkout Repo
56+
uses: actions/checkout@v4
57+
58+
- name: Ubuntu - Install Dependencies - musl
59+
if: matrix.rust_target == 'x86_64-unknown-linux-musl'
60+
run: |
61+
sudo apt-get install -y musl-tools libssl-dev pkg-config perl gcc
62+
63+
- name: Rustup - Install Dependencies - musl
64+
if: matrix.rust_target == 'x86_64-unknown-linux-musl'
65+
run: |
66+
rustup target add x86_64-unknown-linux-musl
67+
68+
- name: Build
69+
run: cargo build -r --target ${{ matrix.rust_target }}
70+
71+
- name: Adjust Target Name
72+
run: |
73+
cp \
74+
target/${{ matrix.rust_target }}/release/http_status_code_check \
75+
target/${{ matrix.rust_target }}/release/http_status_code_check-${{ matrix.rust_target }}
76+
77+
- name: Upload Artifact
78+
uses: actions/upload-artifact@v2
79+
with:
80+
name: ${{ matrix.rust_target }}
81+
path: target/${{ matrix.rust_target }}/release/http_status_code_check-${{ matrix.rust_target }}
3682
github_release_create:
37-
needs: test
83+
needs: cargo_build
3884
name: Github Release - Creating Release
3985
runs-on: ubuntu-latest
4086
outputs:
@@ -80,24 +126,10 @@ jobs:
80126
- name: Checkout Repo
81127
uses: actions/checkout@v4
82128

83-
- name: Ubuntu - Install Dependencies - musl
84-
if: matrix.rust_target == 'x86_64-unknown-linux-musl'
85-
run: |
86-
sudo apt-get install -y musl-tools libssl-dev pkg-config perl
87-
88-
- name: Rustup - Install Dependencies - musl
89-
if: matrix.rust_target == 'x86_64-unknown-linux-musl'
90-
run: |
91-
rustup target add x86_64-unknown-linux-musl
92-
93-
- name: Build
94-
run: cargo build -r --target ${{ matrix.rust_target }}
95-
96-
- name: Adjust Target Name
97-
run: |
98-
cp \
99-
target/${{ matrix.rust_target }}/release/http_status_code_check \
100-
target/${{ matrix.rust_target }}/release/http_status_code_check-${{ matrix.rust_target }}
129+
- uses: actions/download-artifact@v4
130+
with:
131+
name: ${{ matrix.rust_target }}
132+
path: target/${{ matrix.rust_target }}/release/http_status_code_check-${{ matrix.rust_target }}
101133

102134
- name: Publish to Github Releases
103135
env:

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ homepage = "https://github.com/rmoraes92/http_status_code_check"
1010

1111
[dependencies]
1212
clap = { version = "4.5.27", features = ["derive"] }
13-
reqwest = { version = "0.12.12", features = ["blocking"] }
13+
reqwest = { version = "0.12.12", features = ["blocking", "native-tls-vendored"] }
1414

1515
[dev-dependencies]
1616
httpmock = "0.7.0"

0 commit comments

Comments
 (0)