Skip to content

Commit

Permalink
Add more targets
Browse files Browse the repository at this point in the history
  • Loading branch information
33KK committed Sep 12, 2023
1 parent 5ec80d2 commit b0dce91
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,21 @@ jobs:
include:
- target: aarch64-unknown-linux-gnu
host_os: ubuntu-20.04
rustflags: -C linker=aarch64-linux-gnu-gcc
env: RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc"
- target: x86_64-unknown-linux-gnu
host_os: ubuntu-20.04
rustflags:
- target: x86_64-pc-windows-msvc
host_os: windows-2022
rustflags:
# - target: aarch64-unknown-linux-musl
# host_os: ubuntu-20.04
# env: RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" CC="musl-gcc"
- target: x86_64-unknown-linux-musl
host_os: ubuntu-20.04
- target: x86_64-apple-darwin
host_os: macos-latest
rustflags:
# FIXME: Enable when ring 0.17 is released
# - target: aarch64-pc-windows-msvc
# host_os: windows-2022
- target: x86_64-pc-windows-msvc
host_os: windows-2022

steps:
- name: Checkout
Expand All @@ -38,19 +43,17 @@ jobs:
shell: bash
run: |
sudo apt-get update
sudo apt-get install -yq build-essential g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
sudo apt-get install -yq build-essential musl-tools g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Install Dependencies (Linux, x86)
if: startsWith(matrix.host_os, 'ubuntu') && startsWith(matrix.target, 'x86_64')
shell: bash
- name: Install FoundationDB (x86_64-unknown-linux-gnu)
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: |
curl -LO https://github.com/apple/foundationdb/releases/download/7.1.0/foundationdb-clients_7.1.0-1_amd64.deb
sudo dpkg -i --force-architecture foundationdb-clients_7.1.0-1_amd64.deb
echo "USE_FOUNDATIONDB=1" >> "$GITHUB_ENV"
- name: Install Dependencies (MacOS)
if: startsWith(matrix.host_os, 'macos')
shell: bash
- name: Install FoundationDB (x86_64-apple-darwin)
if: matrix.target == 'x86_64-apple-darwin'
run: |
curl -LO https://github.com/apple/foundationdb/releases/download/7.1.34/FoundationDB-7.1.34_x86_64.pkg
sudo installer -allowUntrusted -dumplog -pkg FoundationDB-7.1.34_x86_64.pkg -target /
Expand All @@ -77,7 +80,7 @@ jobs:
export PATH="/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:$PATH"
build() {
RUSTFLAGS="${{matrix.rustflags}}" cargo build --release --target "${target}" "$@"
${{matrix.env}} cargo build --release --target "${target}" "$@"
}
artifact() {
Expand Down

0 comments on commit b0dce91

Please sign in to comment.