-
-
Notifications
You must be signed in to change notification settings - Fork 66
x86 support #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
iamwacko
wants to merge
31
commits into
rust-mobile:master
Choose a base branch
from
iamwacko:32bit
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
x86 support #115
Changes from 2 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
c4d03e2
feat: initial 32 bit support
iamwacko fabe787
chore: cleaned up ci.yml
iamwacko c9ebfcc
fix: typos in ci.yml
iamwacko fb93a17
fix: should be the last typo
iamwacko 1d73dae
fix: target to targets
iamwacko 6e60de5
chore: install gcc-multilib
iamwacko e51dc78
chore: install openssl
iamwacko 11a9d12
fix: add sudo where needed
iamwacko cd3d3bf
fix: more openssl fixes
iamwacko 43e5c9a
fix: satisfy lints by removing uneeded returns
iamwacko a696e0b
fix: typo
iamwacko 31c0e68
fix: even more typos in ci.yml
iamwacko 9e66362
fix: don't need different llvm
iamwacko b292f33
fix: libssl for 32 bit
iamwacko b7bd57b
fix: more ssl stuff
iamwacko f5613b9
fix: more ssl stuff
iamwacko 58f2ad7
fix: more ssl
iamwacko 1eeb1da
fix: install i686 at the right time
iamwacko 844708a
chore: make sure right software is running on the right hosts
iamwacko 92ef8b7
fix: pkg config weirdness
iamwacko 167077a
fix: gcc-multilib
iamwacko 10402ee
fix: libglib install
iamwacko 193a008
fix: this should fix the rest of the problems
iamwacko 2e18d0e
fix: set PKG_CONFIG_SYSROOT_DIR
iamwacko 1d52b22
fix: typo
iamwacko 4523168
fix: stop building when it isn't supposed to
iamwacko 8261002
fix: stop running on macos-latest
iamwacko 00461f8
fix: make ci.yml valid
iamwacko 77a6f34
fix: make ci.yml run
iamwacko b9b4bb5
fix: typo
iamwacko 2d4cad1
Formatting from code review
MarijnS95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -32,6 +32,20 @@ jobs: | |
| name: ${{ matrix.host }}-x | ||
| path: bin/x${{ matrix.host == 'windows-latest' && '.exe' || '' }} | ||
|
|
||
| # Github doesn't have runners for anything but 64 bit | ||
| build-32bit: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: hcrj/setup-rust-action@v1 | ||
| with: | ||
| target: "i686-unknown-linux-gnu" | ||
| - run: cargo install --path xbuild --root . --target i686-unknown-linux-gnu | ||
| - uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: i686-x | ||
| path: bin/x | ||
|
|
||
| build-template: | ||
| strategy: | ||
| fail-fast: false | ||
|
|
@@ -40,10 +54,15 @@ jobs: | |
| - ubuntu-latest | ||
| - macos-latest | ||
| - windows-latest | ||
| host-arch: | ||
| - x86 | ||
| - x64 | ||
| opt: | ||
| - debug | ||
| - release | ||
| target: | ||
| - platform: linux | ||
| arch: x86 | ||
| - platform: linux | ||
| arch: x64 | ||
| - platform: macos | ||
|
|
@@ -56,24 +75,36 @@ jobs: | |
| arch: arm64 | ||
|
|
||
| runs-on: ${{ matrix.host }} | ||
| needs: build | ||
| needs: build build-32bit | ||
| steps: | ||
| - name: install rust | ||
| uses: hecrj/setup-rust-action@v1 | ||
| with: | ||
| rust-version: stable | ||
|
|
||
| - name: install x | ||
| if: ${{ matrix.host-arch == 'x64'}} | ||
|
MarijnS95 marked this conversation as resolved.
Outdated
|
||
| uses: actions/download-artifact@v3 | ||
| with: | ||
| name: ${{ matrix.host }}-x | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not change the name of the artifact so that we can reuse this step? |
||
|
|
||
| - name: install x i686 | ||
| if: ${{ matrix.host-arch == 'x86'}} | ||
|
MarijnS95 marked this conversation as resolved.
Outdated
|
||
| uses: actions/download-artifact@v3 | ||
| with: | ||
| name: i686-x | ||
|
|
||
| - run: chmod +x ./x | ||
| if: ${{ matrix.host == 'ubuntu-latest' || matrix.host == 'macos-latest' }} | ||
|
|
||
| - name: install llvm ubuntu | ||
| if: ${{ matrix.host == 'ubuntu-latest' }} | ||
| if: ${{ matrix.host == 'ubuntu-latest' && matrix.host-arch == 'x64'}} | ||
| run: sudo apt-get update && sudo apt-get install llvm | ||
|
|
||
| - name: install llvm x86 | ||
| if: ${{ matrix.host == 'ubuntu-latest' && matrix.host-arch == 'x86'}} | ||
| run: dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install llvm:i386 | ||
|
|
||
| - name: install llvm macos | ||
| if: ${{ matrix.host == 'macos-latest' }} | ||
| run: | | ||
|
|
@@ -87,9 +118,12 @@ jobs: | |
| java-version: 11 | ||
|
|
||
| - name: install linux dependencies | ||
| if: ${{ matrix.host == 'ubuntu-latest' }} | ||
| if: ${{ matrix.host == 'ubuntu-latest' && matrix.arch-host == 'x64'}} | ||
| run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev libgtk-3-dev squashfs-tools | ||
|
|
||
| - name: install dependencies for i686 | ||
| if: ${{ matrix.host == 'ubuntu-latest' && matrix.arch-host == 'x86'}} | ||
|
|
||
| - name: create project | ||
| run: ./x new template | ||
|
|
||
|
|
@@ -98,7 +132,9 @@ jobs: | |
| # windows doesn't support posix symlinks so can't cross compile to macos/ios | ||
| - name: build project | ||
| if: > | ||
| !(matrix.host == 'macos-latest' && matrix.target.platform == 'linux' || | ||
| !(matrix.host == 'macos-latest' && matrix.arch-host == 'x86' || | ||
| matrix.host == 'windows-latest' && matrix.arch-host == 'x86' || | ||
| matrix.host == 'macos-latest' && matrix.target.platform == 'linux' || | ||
| matrix.host == 'windows-latest' && contains(fromJson('["linux", "macos", "ios"]'), matrix.target.platform)) | ||
| run: ../x build --platform ${{ matrix.target.platform }} --arch ${{ matrix.target.arch }} --${{ matrix.opt }} | ||
| working-directory: template | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the source of this file? |
Binary file not shown.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to add the
.exesuffix for Windows... And add a 32-bit Windows build?