Skip to content

Commit

Permalink
Use M1 runner to build m1 artifacts (#165)
Browse files Browse the repository at this point in the history
* wip add m1 builds to ci

* re-enable all builds

* remove apple silicon build section from DEVELOP.md 🎉
  • Loading branch information
jonmmease committed Apr 15, 2024
1 parent f34a3bb commit 2305352
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 25 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,38 @@ jobs:
path: |
vl-convert_osx-64.zip
build-cli-osx-arm64:
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build vl-convert
uses: actions-rs/cargo@v1
with:
command: build
args: -p vl-convert --release
- name: Move executable to bin directory
run: |
mkdir -p bin
cp target/release/vl-convert bin/
cp LICENSE bin/
cp thirdparty_* bin/
zip -r vl-convert_osx-arm64.zip bin/
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: vl-convert
path: |
vl-convert_osx-arm64.zip
build-wheels-linux-x86_64:
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -249,6 +281,25 @@ jobs:
name: wheels
path: dist

build-wheels-osx-arm64:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build Intel wheels
uses: messense/maturin-action@v1
with:
command: build
args: --release -m vl-convert-python/Cargo.toml -o dist --strip
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

publish-pypi:
name: Publish to PyPI
environment: PyPI Upload
Expand Down
25 changes: 0 additions & 25 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,6 @@ $ cargo ws publish --all --force "vl-convert*" custom 0.1.0
## Publish Python packages to PyPI
The `cargo ws publish ...` command above will push a commit to the `main` branch. This push to `main` will trigger CI, including the "Publish to PyPI" job. This job must be approved manually in the GitHub interface. After it is approved it will run and publish the Python packages to PyPI.

## Build Apple Silicon packages
Cross compiling vl-convert packages from macOS x86 to macOS arm64 is not currently working in GitHub Actions, so for the time being the Apple Silicon packages must be built locally from an Apple Silicon machine.

### Build CLI
Build the Apple Silicon CLI application with:
```
cargo build -p vl-convert --release
zip -j target/release/vl-convert_osx-arm64.zip target/release/vl-convert
```

This will produce `target/release/vl-convert_osx-arm64.zip`, which should be uploaded to the GitHub Release below

### Build Python wheels
Build the Python wheels with:
```
rm -rf target/wheels
maturin build -m vl-convert-python/Cargo.toml --release --strip
```

This will produce a wheel file in `target/wheels`, which should be uploaded to the GitHub Release below. These wheels must also be uploaded to PyPI with:

```
twine upload target/wheels/*.whl
```

## Create GitHub Release
Create a new GitHub release using the `v0.1.0` tag.

Expand Down

0 comments on commit 2305352

Please sign in to comment.