* TSX ends up 0.3% at 19,878.56

* Energy gains 1.3% as oil settles 2.5% higher

* Tech stocks rally 0.7%

July 11 (Reuters) - Canada's main stock index rose on Tuesday, led by gains for energy and information technology stocks, while investors looked forward to U.S. inflation data and a Bank of Canada interest rate announcement on Wednesday.

The Toronto Stock Exchange's S&P/TSX composite index ended up 56.11 points, or 0.3%, at 19,878.56.

The BoC is expected to deliver another 25-basis-point rate hike after data last week hinted at a robust jobs market.

"We think that tomorrow we're going to see a rate hike," said Angelo Kourkafas, senior investment strategist at Edward Jones.

"But investors likely realize that the BoC is nearing the end of its tightening campaign, so potentially, tomorrow's rate hike could be the last one of the cycle."

U.S. stocks also ended higher, helped by gains in financial shares ahead of a U.S. consumer price index report on Wednesday that could offer clues on whether inflation is abating and if the Federal Reserve is nearing the end of its rate hiking cycle.

The Toronto market's technology sector rallied 0.7%, with Shopify advancing 1.7% after it announced a partnership with U.S. streaming device maker Roku.

Energy shares added 1.3% as oil settled 2.5% higher at $74.83 a barrel.

Shares of TransAlta Renewables Inc soared 18.5% as electric utility firm TransAlta Corp said it would buy the rest of the stake in the company it does not own. (Reporting by Fergal Smith in Toronto and Siddarth S and Shashwat Chauhan in Bengaluru; Editing by Maju Samuel, Pooja Desai and Sandra Maler)