In a sudden turnaround yesterday, House Speaker Thomas P. (Tip) O'Neill cleared President Carter's civil service revision bill for floor action today.

The troubled bill got that unexpected break because of both pressure from White House supporters and O'Neill's concern about reports that he was holding the legislation hostage to avenge Carter's recent firing of O'Neill protege, Capitol Hill sources said.

The news sent lobbyists on both sides of the complicated bill scrambling for votes and drafting a blizzard of amendments to be offered today.

President Carter called a special meeting of his cabinet yesterday just to give them a pep talk on the bill. He urged them to contact members of Congress concerning "several key votes on amendments which could cripple the bill."

The House Rules Committee approved a parliamentary measure that will make it possible for the full House to drop two controversial provisions supported by federal employes unions but which Carter says will cost the bill its conservative and moderate supporters.

Those measures, tacked onto the bill by the House Post Office and Civil Service Committee, include one that would allow federal workers to take an active role in partisan politics, activities now prohibited by the Hatch Act, and one that would reduce the work week of federal firefighters, which Carter recently vetoed.

The Carter forces picked up points for another controversial portion of the package yesterday when leaders of Vietnam veterans' groups endorsed a compromise on Carter's proposed modifications of the veteran's preference law.

Rep. David E. Bonior, chairman of the Vietnam Veterans in Congress, and Rep. Pat schroeder, who wrote the House committee version of the proposal announced the compromise, which would extend the time limit for a one-time use of veterans preference rights to 1985. This would allow Vietnam veterans (from 1964 on) more time to benefit from the advantages in federal hiring and job retention.

The floor vote on veterans preference is looking closer than had been predicted according to Hill sources. Because the major veterans groups have vigorously opposed any change whatsoever in the preference law, it had been expected to be defeated easily.

Meanwhile, opponents of various provisions of the bill were readying hundreds of amendments to the legislation.

Labor forces, led by Rep. William Clay (D-Mo.), were planning a strategy to retain the Hatch Act revision, despite the administration's parliamentary advantage.They were also preparing a parade of amendments concerning various other concerns of the unions.

The Chamber of Commerce and other business interests, on the other hand, were lobbying furiously against almost all of the concessions to labor contained in the House version.

As of late Wednesday, the Carter forces had more or less resigned themselves to the prospect that the civil service bill would not make it to the floor until after the August recess, when it would be in a tight race against Congress' final adjournment.

Though President Carter had billed civil service revision as one of his top priorities, O'Neill had appeared to drop it from his own list of "must" legislation for this session, sparking rumors on Capitol Hill that O'Neill was "sticking it to the president" by letting his bill languish.

Referring to a report suggesting strategy, which appeared in The New York Times Wednesday, one administration aide, remarked, after the bill had suddenly been scheduled, "they've given us some innaccurate stories, but this time maybe they did us a favor."

The barriers began to dissolve for the bill, some observers said, after a meeting Wednesday between O'Neill and Rep. Morris K. Udall (D-Ariz.) who is managing the bill for the administration. O'Neill reportedly promised Udall the "first available window" in the crowded legislative calendar.

Rep. John Brademas (D-Ind.), House majority whip, said the House leadership had pushed the bill up because of an administration request.

O'Neill wanted to dispel reports that he would stoop to holding up a bill out of pique, according to some observers. O'Neill himself denied that he would do such a thing and pointed to the speedy scheduling as proof.