-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This enables a set of LLVM optimization passes for the "balanced" and "aggressive" profiles. Both are based on the "default<O2>" pipeline, with the removal of some irrelevant passes. In the case of the "balanced" profile we also remove some additional passes that aren't likely to be useful in most cases. This fixes #595. Changelog: added
- Loading branch information
1 parent
63280d0
commit 571ba8f
Showing
7 changed files
with
345 additions
and
79 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -63,49 +63,65 @@ jobs: | |
- name: Check the formatting | ||
run: 'cd std && cargo run -- fmt --check' | ||
|
||
amd64-linux-gnu: | ||
compiler-linux: | ||
strategy: | ||
matrix: | ||
include: | ||
- image: 'ci:fedora' | ||
target: amd64-linux-gnu | ||
- image: 'ci:alpine' | ||
target: amd64-linux-musl | ||
name: ${{ matrix.target }} compiler | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-24.04 | ||
container: | ||
image: ghcr.io/inko-lang/ci:fedora | ||
image: ghcr.io/inko-lang/${{ matrix.image }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: '${{ env.CARGO_HOME }}' | ||
key: amd64-linux-gnu-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | ||
key: ${{ matrix.target }}-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | ||
- name: Run compiler tests | ||
run: cargo test | ||
- name: Run stdlib tests with default optimizations | ||
run: 'cd std && cargo run -- test' | ||
- name: Run stdlib tests without optimizations | ||
run: 'cd std && cargo run -- test --opt=none' | ||
- name: Run stdlib tests with aggressive optimizations | ||
run: 'cd std && cargo run -- test --opt=aggressive' | ||
|
||
amd64-linux-musl: | ||
std-linux: | ||
strategy: | ||
matrix: | ||
level: | ||
- none | ||
- balanced | ||
- aggressive | ||
include: | ||
- image: 'ci:fedora' | ||
target: amd64-linux-gnu | ||
- image: 'ci:alpine' | ||
target: amd64-linux-musl | ||
name: ${{ matrix.target }} std --opt=${{ matrix.level }} | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-24.04 | ||
container: | ||
image: ghcr.io/inko-lang/ci:alpine | ||
image: ghcr.io/inko-lang/${{ matrix.image }} | ||
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 with default optimizations | ||
run: 'cd std && cargo run -- test' | ||
- name: Run stdlib tests without optimizations | ||
run: 'cd std && cargo run -- test --opt=none' | ||
- name: Run stdlib tests with aggressive optimizations | ||
run: 'cd std && cargo run -- test --opt=aggressive' | ||
key: ${{ matrix.target }}-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | ||
- name: Run tests | ||
run: 'cd std && cargo run -- test --opt=${{ matrix.level }}' | ||
|
||
amd64-mac-native: | ||
compiler-mac: | ||
strategy: | ||
matrix: | ||
include: | ||
- runner: macos-13 | ||
target: amd64-mac-native | ||
- runner: macos-14 | ||
target: arm64-mac-native | ||
name: ${{ matrix.target }} compiler | ||
timeout-minutes: 15 | ||
runs-on: macos-13 | ||
runs-on: ${{ matrix.runner }} | ||
env: | ||
RUSTUP_HOME: ${{ github.workspace }}/.rustup-home | ||
steps: | ||
|
@@ -115,21 +131,27 @@ jobs: | |
path: | | ||
${{ env.CARGO_HOME }} | ||
${{ env.RUSTUP_HOME }} | ||
key: amd64-mac-native-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | ||
key: ${{ matrix.target }}-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | ||
- name: Install dependencies | ||
run: ./ci/mac.sh | ||
- name: Run compiler tests | ||
run: cargo test | ||
- name: Run stdlib tests with default optimizations | ||
run: 'cd std && cargo run -- test' | ||
- name: Run stdlib tests without optimizations | ||
run: 'cd std && cargo run -- test --opt=none' | ||
- name: Run stdlib tests with aggressive optimizations | ||
run: 'cd std && cargo run -- test --opt=aggressive' | ||
|
||
arm64-mac-native: | ||
std-mac: | ||
strategy: | ||
matrix: | ||
level: | ||
- none | ||
- balanced | ||
- aggressive | ||
include: | ||
- runner: macos-13 | ||
target: amd64-mac-native | ||
- runner: macos-14 | ||
target: arm64-mac-native | ||
name: ${{ matrix.target }} std --opt=${{ matrix.level }} | ||
timeout-minutes: 15 | ||
runs-on: macos-14 | ||
runs-on: ${{ matrix.runner }} | ||
env: | ||
RUSTUP_HOME: ${{ github.workspace }}/.rustup-home | ||
steps: | ||
|
@@ -139,19 +161,40 @@ jobs: | |
path: | | ||
${{ env.CARGO_HOME }} | ||
${{ env.RUSTUP_HOME }} | ||
key: arm64-mac-native-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | ||
key: ${{ matrix.target }}-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | ||
- name: Install dependencies | ||
run: ./ci/mac.sh | ||
- name: Run compiler tests | ||
run: cargo test | ||
- name: Run stdlib tests with default optimizations | ||
run: 'cd std && cargo run -- test' | ||
- name: Run stdlib tests without optimizations | ||
run: 'cd std && cargo run -- test --opt=none' | ||
- name: Run stdlib tests with aggressive optimizations | ||
run: 'cd std && cargo run -- test --opt=aggressive' | ||
- name: Run tests | ||
run: 'cd std && cargo run -- test --opt=${{ matrix.level }}' | ||
|
||
compiler-freebsd: | ||
name: amd64-freebsd-native compiler | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-24.04 | ||
env: | ||
RUSTUP_HOME: ${{ github.workspace }}/.rustup-home | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
${{ env.CARGO_HOME }} | ||
${{ env.RUSTUP_HOME }} | ||
key: amd64-freebsd-native-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | ||
- name: Run tests | ||
uses: cross-platform-actions/[email protected] | ||
with: | ||
operating_system: freebsd | ||
version: '14.0' | ||
memory: 8G | ||
environment_variables: 'CARGO_HOME RUSTUP_HOME' | ||
image_url: 'https://github.com/inko-lang/freebsd-builder/releases/download/v0.8.0/freebsd-14.0-x86-64.qcow2' | ||
run: ./ci/freebsd.sh compiler | ||
|
||
amd64-freebsd-native: | ||
# FreeBSD builds are a bit slow due to the use of a VM, so we only run the | ||
# stdlib tests using the default optimization level. | ||
std-freebsd: | ||
name: amd64-freebsd-native std | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-24.04 | ||
env: | ||
|
@@ -172,4 +215,4 @@ jobs: | |
memory: 8G | ||
environment_variables: 'CARGO_HOME RUSTUP_HOME' | ||
image_url: 'https://github.com/inko-lang/freebsd-builder/releases/download/v0.8.0/freebsd-14.0-x86-64.qcow2' | ||
run: ./ci/freebsd.sh | ||
run: ./ci/freebsd.sh std |
This file contains 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 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
Oops, something went wrong.