Skip to content

Commit

Permalink
temp: making ci work
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyscot committed Jan 12, 2025
1 parent c3c94fb commit 7624e0e
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 36 deletions.
39 changes: 21 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
47 changes: 29 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ split-debuginfo="unpacked"
[profile.release]
lto = "thin"
strip = "symbols"

0 comments on commit 7624e0e

Please sign in to comment.