Skip to content

Commit

Permalink
Update release.yml (#187)
Browse files Browse the repository at this point in the history
* Update release.yml

* remove cargo release profile
* remove cross
* use stable rust in all cases

---------

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
  • Loading branch information
gwbres authored Nov 29, 2023
1 parent 7b13a23 commit 2be6e55
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 47 deletions.
66 changes: 22 additions & 44 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,36 @@ jobs:
name: build
runs-on: ${{ matrix.os }}
env:
# For some builds, we use cross to test on 32-bit and big-endian
# systems.
CARGO: cargo
# When CARGO is set to CROSS, this is set to `--target matrix.target`.
TARGET_FLAGS: ''
# When CARGO is set to CROSS, TARGET_DIR includes matrix.target.
TARGET_DIR: ./target
# Bump this as appropriate. We pin to a version to make sure CI
# continues to work as cross releases in the past have broken things
# in subtle ways.
CROSS_VERSION: v0.2.5
# Emit backtraces on panics.
RUST_BACKTRACE: 1
strategy:
fail-fast: false
matrix:
include:
- build: linux
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
- build: linux
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-musl
- build: macos
os: macos-latest
rust: nightly
rust: stable
target: x86_64-apple-darwin
- build: macos
os: macos-latest
rust: stable
target: aarch64-apple-darwin
- build: win64-msvc
os: windows-latest
rust: nightly
rust: stable
target: x86_64-pc-windows-msvc
- build: win64-gnu
os: windows-latest
rust: nightly-x86_64-gnu
rust: stable-x86_64-gnu
target: x86_64-pc-windows-gnu

steps:
Expand All @@ -64,40 +62,20 @@ jobs:
sudo apt-get update
sudo apt-get install -y libudev-dev
- name: Use Cross
if: matrix.os == 'ubuntu-latest' && matrix.target != ''
shell: bash
run: |
# In the past, new releases of 'cross' have broken CI. So for now, we
# pin it. We also use their pre-compiled binary releases because cross
# has over 100 dependencies and takes a bit to compile.
dir="$RUNNER_TEMP/cross-download"
mkdir "$dir"
echo "$dir" >> $GITHUB_PATH
cd "$dir"
curl -LO "https://github.com/cross-rs/cross/releases/download/$CROSS_VERSION/cross-x86_64-unknown-linux-musl.tar.gz"
tar xf cross-x86_64-unknown-linux-musl.tar.gz
echo "CARGO=cross" >> $GITHUB_ENV
- name: Set target variables
shell: bash
run: |
echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV
- name: Show command used for Cargo
shell: bash
run: |
echo "cargo command is: ${{ env.CARGO }}"
echo "target flag is: ${{ env.TARGET_FLAGS }}"
echo "target dir is: ${{ env.TARGET_DIR }}"
- name: Build applications
shell: bash
run: |
${{ env.CARGO }} build --verbose --target ${{ matrix.target }} -r -p rinex-cli -p rnx2cggtts -p rnx2crx -p crx2rnx -p ublox-rnx
ls -lah target
ls -lah target/${{ matrix.target }}
CARGO_PROFILE_RELEASE_STRIP=symbols ${{ env.CARGO }} build \
--verbose \
--target ${{ matrix.target }} \
--all-features \
--release \
-p rinex-cli \
-p rnx2cggtts \
-p rnx2crx \
-p crx2rnx \
-p ublox-rnx
ls -lah target/${{ matrix.target }}/release
if [ "${{ matrix.os }}" = "windows-latest" ]; then
crx2rnx="target/${{ matrix.target }}/release/crx2rnx.exe"
rnx2crx="target/${{ matrix.target }}/release/rnx2crx.exe"
Expand Down
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ members = [
]

exclude = ["./test_resources"]

[profile.release]
strip = "symbols"

0 comments on commit 2be6e55

Please sign in to comment.