The integral can be rewritten as
$$\mathcal I=\int\frac{\mathrm dx}{(x^2-x+1)\sqrt{x^2+x+1}}=\int\frac{\mathrm dx}{|x|^\frac32\left(|x|+\frac1{|x|}-\text{sgn}(x)\right)\sqrt{|x|+\frac1{|x|}+\text{sgn}(x)}}$$
This can be simplified by the substitution $t=\frac1{\sqrt{|x|}}$.
$$\mathcal I=-\text{sgn}(x)\int\frac{2\mathrm dt}{\left(t^2+\frac1{t^2}-\text{sgn}(x)\right)\sqrt{t^2+\frac1{t^2}+ \text{sgn}(x)}}$$
Now, writing the numerator of the integrand as $\left(1+\frac1{t^2}\right)+\left(1-\frac1{t^2}\right)$, we get:
$$\mathcal I=-\text{sgn}(x)\underbrace{\int\frac{\mathrm d\left(t-\frac1t\right)}{\left(\left(t-\frac1t\right)^2+2-\text{sgn}(x)\right)\sqrt{\left(t-\frac1t\right)^2+2+\text{sgn}(x)}}}_{\mathcal I_1}-\text{sgn}(x)\underbrace{\int\frac{\mathrm d\left(t+\frac1t\right)}{\left(\left(t+\frac1t\right)^2-2- \text{sgn}(x)\right)\sqrt{\left(t+\frac1t\right)^2-2+\text{sgn}(x)}}}_{\mathcal I_2}$$
It is imminent that we need to make $2$ cases to handle $\text{sgn}(x)$:$-$
$\textbf{Case 1, $x>0\,$:}$
$$\mathcal I=-\underbrace{\int\frac{\mathrm d\left(t-\frac1t\right)}{\left(\left(t-\frac1t\right)^2+1\right)\sqrt{\left(t-\frac1t\right)^2+3}}}_{\mathcal I_1}-\underbrace{\int\frac{\mathrm d\left(t+\frac1t\right)}{\left(\left(t+\frac1t\right)^2-3\right)\sqrt{\left(t+\frac1t\right)^2-1}}}_{\mathcal I_2}$$
These integrals can be evaluated in any of the following ways:
$1.$ For $\mathcal I_1$, substitute
$2.$ For $\mathcal I_2$, substitute
$\textbf{Case 2, $x<0\,$:}$
$$\mathcal I=\underbrace{\int\frac{\mathrm d\left(t-\frac1t\right)}{\left(\left(t-\frac1t\right)^2+3\right)\sqrt{\left(t-\frac1t\right)^2+1}}}_{\mathcal I_1}+\underbrace{\int\frac{\mathrm d\left(t+\frac1t\right)}{\left(\left(t+\frac1t\right)^2-1\right)\sqrt{\left(t+\frac1t\right)^2-3}}}_{\mathcal I_2}$$
These integrals can be evaluated in any of the following ways
$1.$ For $\mathcal I_1$, substitute
$2.$ For $\mathcal I_2$, substitute
The final result comes out to be
$$\boxed{\frac1{\sqrt2}\sin^{-1}\left(\sqrt{\frac23}\frac{x-1}{\sqrt{x^2-x+1}}\right)+\frac1{\sqrt6}\tanh^{-1}\left(\sqrt{\frac23}\frac{x+1}{\sqrt{x^2+x+1}}\right)+C}$$