Skip to content

Commit

Permalink
Fix building the compiler on Alpine/musl
Browse files Browse the repository at this point in the history
With https://gitlab.com/taricorp/llvm-sys.rs/-/issues/44 solved, it's
now possible to build the compiler on Alpine/musl targets. This commit
updates the LLVM dependencies for that, fixes a few deprecation
warnings, and updates the CI configuration such that we run tests on
Alpine.

Changelog: fixed
  • Loading branch information
yorickpeterse committed Sep 13, 2024
1 parent 3f1719f commit 7ae964e
Show file tree
Hide file tree
Showing 10 changed files with 262 additions and 234 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/runtimes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ env:
RUSTUP_TOOLCHAIN: '1.78'

jobs:
linux-amd64:
name: Linux AMD64
amd64-linux:
runs-on: ubuntu-latest
container:
image: ghcr.io/inko-lang/ci:debian-amd64
Expand All @@ -26,8 +25,7 @@ jobs:
retention-days: 2
compression-level: 0

linux-arm64:
name: Linux ARM64
arm64-linux:
runs-on: ubuntu-latest
container:
image: ghcr.io/inko-lang/ci:debian-arm64
Expand All @@ -43,8 +41,7 @@ jobs:
retention-days: 2
compression-level: 0

macos-amd64:
name: macOS AMD64
amd64-mac:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
Expand All @@ -60,8 +57,7 @@ jobs:
retention-days: 2
compression-level: 0

macos-arm64:
name: macOS ARM64
arm64-mac:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
Expand All @@ -77,8 +73,7 @@ jobs:
retention-days: 2
compression-level: 0

freebsd-amd64:
name: FreeBSD AMD64
amd64-freebsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -109,11 +104,11 @@ jobs:
RCLONE_S3_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }}
RCLONE_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
needs:
- linux-amd64
- linux-arm64
- macos-amd64
- macos-arm64
- freebsd-amd64
- amd64-linux
- arm64-linux
- amd64-mac
- arm64-mac
- amd64-freebsd
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand Down
35 changes: 23 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ jobs:
- name: Check the formatting
run: 'cd std && cargo run -- fmt --check'

linux-amd64:
name: Linux AMD64
amd64-linux-gnu:
runs-on: ubuntu-latest
container:
image: ghcr.io/inko-lang/ci:fedora
Expand All @@ -73,14 +72,28 @@ jobs:
- uses: actions/cache@v4
with:
path: '${{ env.CARGO_HOME }}'
key: linux-amd64-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
key: amd64-linux-gnu-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
- name: Run compiler tests
run: cargo test
- name: Run stdlib tests
run: 'cd std && cargo run -- test'

macos-amd64:
name: macOS AMD64
amd64-linux-musl:
runs-on: ubuntu-latest
container:
image: ghcr.io/inko-lang/ci:alpine
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: '${{ env.CARGO_HOME }}'
key: amd64-linux-musl-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
- name: Run compiler tests
run: cargo test
- name: Run stdlib tests
run: 'cd std && cargo run -- test'

amd64-mac-native:
runs-on: macos-12
env:
RUSTUP_HOME: ${{ github.workspace }}/.rustup-home
Expand All @@ -91,16 +104,15 @@ jobs:
path: |
${{ env.CARGO_HOME }}
${{ env.RUSTUP_HOME }}
key: mac-amd64-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
key: amd64-mac-native-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
- name: Install dependencies
run: ./ci/mac.sh
- name: Run compiler tests
run: cargo test
- name: Run stdlib tests
run: 'cd std && cargo run -- test'

macos-arm64:
name: macOS ARM64
arm64-mac-native:
runs-on: macos-14
env:
RUSTUP_HOME: ${{ github.workspace }}/.rustup-home
Expand All @@ -111,16 +123,15 @@ jobs:
path: |
${{ env.CARGO_HOME }}
${{ env.RUSTUP_HOME }}
key: mac-arm64-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
key: arm64-mac-native-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
- name: Install dependencies
run: ./ci/mac.sh
- name: Run compiler tests
run: cargo test
- name: Run stdlib tests
run: 'cd std && cargo run -- test'

freebsd-amd64:
name: FreeBSD AMD64
amd64-freebsd-native:
runs-on: ubuntu-latest
env:
RUSTUP_HOME: ${{ github.workspace }}/.rustup-home
Expand All @@ -131,7 +142,7 @@ jobs:
path: |
${{ env.CARGO_HOME }}
${{ env.RUSTUP_HOME }}
key: freebsd-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
key: amd64-freebsd-native-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
- name: Run tests
uses: cross-platform-actions/action@v0.24.0
with:
Expand Down
Loading

0 comments on commit 7ae964e

Please sign in to comment.