Skip to content

Commit

Permalink
build library only; use consistent rust compiler version
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
  • Loading branch information
andrewwhitehead committed Jan 27, 2023
1 parent 8b34882 commit 0508b3f
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install Rust toolchain
- if: "!matrix.use_cross"
name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.58.0"
Expand Down Expand Up @@ -311,6 +312,7 @@ jobs:
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "always-auth=true" >> .npmrc
# TODO: this will currently publish the version as defined in the package.json. If the version already
# exists on NPM it will skip the publishing. This means if a new version is released, but the version hasn't been
# updated in the package.json files yet, it won't publish to NPM (which is kinda nice). We should however add a check
Expand All @@ -331,13 +333,18 @@ jobs:
[aarch64-apple-ios, aarch64-apple-ios-sim, x86_64-apple-ios]

steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
toolchain: "1.58.0"
targets: ${{ matrix.architecture }}
- run: cargo build --target ${{matrix.architecture}} --release

- name: Build library
run: cargo build --lib --target ${{matrix.architecture}} --release

- name: Save library
uses: actions/upload-artifact@v3
with:
Expand All @@ -358,10 +365,14 @@ jobs:
]

steps:
- uses: actions/checkout@v3
- run: |
- name: Checkout
uses: actions/checkout@v3

- name: Build library
run: |
cargo install --bins --git https://github.com/rust-embedded/cross --tag v0.2.4 cross
cross build --release --target ${{matrix.architecture}}
cross build --lib --release --target ${{matrix.architecture}}
- name: Save library
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 0508b3f

Please sign in to comment.