-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,28 +56,31 @@ jobs: | |
run: scripts/install-ubuntu-packages | ||
# native builds need all of these; cross builds only need binutils-multiarch | ||
|
||
#- name: Build | ||
# run: cross build --release --locked --target ${{ matrix.target }} | ||
- uses: taiki-e/[email protected] | ||
id: build | ||
- name: Build | ||
run: | | ||
docker run --rm -v $PWD:/workspace -w /workspace \ | ||
-v ~/.cargo/git:/root/.cargo/git \ | ||
-v ~/.cargo/registry:/root/.cargo/registry \ | ||
rust:slim sh -c " | ||
apt-get update && apt-get install -y capnproto | ||
cargo install cross | ||
cross build --release --locked --target ${{ matrix.target }} | ||
" | ||
- name: Package | ||
run: | | ||
mkdir -p target/qcp-${{matrix.target}} && | ||
cp README.md LICENSE CHANGELOG.md target/${{ matrix.target }}/release/qcp target/qcp-${{matrix.target}}/ && | ||
tar -C target zcf qcp-${{ matrix.target }}.tar.gz qcp-${{matrix.target}} | ||
- name: Upload tar artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
bin: qcp | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
target: ${{ matrix.target }} | ||
include: README.md,LICENSE,CHANGELOG.md | ||
leading-dir: true | ||
locked: true | ||
tar: unix | ||
zip: windows | ||
dry_run: true | ||
name: qcp-tarball-${{ matrix.target }} | ||
path: target/qcp-${{ matrix.target }}.tar.gz | ||
|
||
- name: Make deb package | ||
if: ${{ matrix.build_deb }} | ||
run: scripts/make-debian-package --no-release ${{ matrix.target }} | ||
- name: Upload binary artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: qcp-tarball-${{ matrix.target }} | ||
path: ${{ steps.build.outputs.archive }}.tar.gz | ||
- name: Upload deb artifact | ||
if: ${{ matrix.build_deb }} | ||
uses: actions/upload-artifact@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,34 +47,45 @@ jobs: | |
run: scripts/install-ubuntu-packages | ||
# native builds need all of these; cross builds only need binutils-multiarch | ||
|
||
#- name: Build | ||
# run: cross build --release --locked --target ${{ matrix.target }} | ||
- uses: taiki-e/[email protected] | ||
id: build | ||
- name: Build | ||
run: | | ||
docker run --rm -v $PWD:/workspace -w /workspace \ | ||
-v ~/.cargo/git:/root/.cargo/git \ | ||
-v ~/.cargo/registry:/root/.cargo/registry \ | ||
rust:slim sh -c " | ||
apt-get update && apt-get install -y capnproto | ||
cargo install cross | ||
cross build --release --locked --target ${{ matrix.target }} | ||
" | ||
- name: Package | ||
run: | | ||
mkdir -p target/qcp-${{matrix.target}} && | ||
cp README.md LICENSE CHANGELOG.md target/${{ matrix.target }}/release/qcp target/qcp-${{matrix.target}}/ && | ||
tar -C target zcf qcp-${{ matrix.target }}.tar.gz qcp-${{matrix.target}} | ||
- name: Upload tar artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
bin: qcp | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
target: ${{ matrix.target }} | ||
include: README.md,LICENSE,CHANGELOG.md | ||
leading-dir: true | ||
locked: true | ||
tar: unix | ||
zip: windows | ||
dry_run: ${{ github.event_name != 'release' }} | ||
name: qcp-tarball-${{ matrix.target }} | ||
path: target/qcp-${{ matrix.target }}.tar.gz | ||
|
||
- name: Make deb package | ||
if: ${{ matrix.build_deb }} | ||
run: scripts/make-debian-package --release ${{ matrix.target }} | ||
- name: Upload binary artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: qcp-tarball-${{ matrix.target }} | ||
path: ${{ steps.build.outputs.archive }}.tar.gz | ||
|
||
- name: Upload deb artifact | ||
if: ${{ matrix.build_deb }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: qcp-deb-${{ matrix.target }} | ||
path: ${{ env.BUILT_DEB_FILE }} | ||
|
||
- name: Publish tar package to release | ||
if: ${{ github.event_name == 'release' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh release upload ${{ github.ref_name }} target/qcp-${{ matrix.target }}.tar.gz | ||
|
||
- name: Publish deb package to release | ||
if: ${{ matrix.build_deb }} && ${{ github.event_name == 'release' }} | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ split-debuginfo="unpacked" | |
[profile.release] | ||
lto = "thin" | ||
strip = "symbols" | ||
|